CAIRO, Egypt (AP) _ After two years of trying times for Egypt's tourist industry, foreign visitors are again walking along the Nile River, milling around the Giza pyramids and diving in spectacular Red Sea coral reefs.

When the books are closed on 1995, the government expects to report a boom year for tourism _ a major source of hard currency for the impoverished nation.

Now Egypt _ troubled by a tenacious Islamic insurgency _ just has to stay safe, or at least maintain the perception, so that foreigners keep coming to spend money.

``We did not think of security at all when we decided to come and have seen nothing to make us change our mind,'' said Anna Acevedo, a tourist from Argentina on her last day in Cairo.

Muslim militants have killed eight tourists, most of them European, since they sharply escalated their campaign to overthrow the government and install strict Islamic rule.

In all, nearly 850 people have died, most of them militants and police in Egypt's southern provinces, which are also the site of the country's greatest Pharaonic monuments.

President Hosni Mubarak's government has struck back hard, detaining hundreds, clamping curfews on villages, even arresting relatives of suspected militants, human rights groups say.

Since then, attacks have dwindled, mostly confined to two out-of-the-way southern provinces. The capital of Cairo _ shaken by a rash of bombings in 1993 _ is now bedeviled more by rambunctious drivers and careening, crowded buses than Muslim militants.

The tourists seem to have noticed.

Hotels in Cairo are 80- to 90-percent full for the winter, the country's top tourism season. That occupancy rate was almost unheard of in the past few years, after the attacks by Muslim militants began.

Three million tourists visited in 1992, but the number dropped to fewer than 2.5 million the following year because of the violence.

By the end of 1995, Egyptian officials hope the number of tourists will exceed 3 million, setting a record and returning tourism revenues to their position as Egypt's second-biggest earner of hard currency, after the billions of dollars sent home by Egyptian workers abroad.

Nile cruises _ the fashion for Europe's elite in the 19th century _ are again booked. For a while in 1993, dozens of giant boats stood idle in the docks in Luxor, reluctant to plow troubled patches of the Nile where Muslim militants were active.

``Just today, we got 170 new applications for our Nile cruises, which are already fully booked,'' said Maha Saad, sales promotion manager for ITT Sheraton hotels in Egypt. Referring delicately to the insurgents, Saad added, ``We hope there aren't any more incidents.''

So does the government, which seemed to ignore a new warning by the militant al-Gamaa al-Islamiyya, or the Islamic Group, for tourists to leave Egypt immediately ``to save their lives.'' The handwritten statement was issued last week after assailants opened fire on two trains in southern Egypt's Qena Province.

In the first attack, 10 Egyptians, including a 10-year-old boy, were wounded. A day later, an Egyptian was shot and hospitalized and two tourists _ a Dutch man and a French woman _ were cut by broken glass but continued their journey.

The Islamic Group claimed responsibility for the first attack, and suspicion fell on Muslim militants in the other.

Those attacks seemed distant from the Egyptian museum in downtown Cairo, which is home to Tutankhamun's treasures as well as thousands of other spectacular, ancient Egyptian pieces.

October was the museum's best month: 105,000 tourists, up from 66,000 in October 1994.

``Tourism has been increasing for a year now but October was the peak,'' said Sabry Arafa, the museum's administrative director.

Cairo's Hanging Church, once a Pharaonic temple and now considered the oldest church in the world, is another tourist favorite, with its faded icons on wood paneling and the ceiling.

Attacks were not on the minds of visitors there, and the government would like to keep it that way.

``We had no problem with security,'' said Isabelle Lannezval, an art student in Paris, which has had to deal with its own spate of bombings blamed on Muslim militants. ``In fact, it is worse in Paris than here.''