LOS ANGELES — A US federal ranger was shot dead in Mount Rainier National Park on Sunday, triggering a manhunt for the gunman and the closure of the park in Washington state, officials said.

The suspect escaped on foot after shooting the 34-year-old female ranger, a park spokeswoman said, adding that authorities had only a few hours before nightfall would make tracking him difficult.

The gunman "fatally shot her. He then fled into the woods. So the situation that we have now is an armed gunman, who is in the park somewhere, has not yet been apprehended," park spokeswoman Lee Taylor told CNN.

The park, which is popular with hikers and campers and had only just opened for New Year's Day, was immediately closed.

"We have been evacuating visitors but we do still have people in the park, there are people who are out snowshoeing or skiing who are coming back in," she said.

"We also have about 85 park visitors who are in our main park visitors center and we're holding them there until we believe that it is safe for them to drive out of the park."

The shooting occurred mid-morning in the park, the Seattle Times newspaper said, citing a witness as saying he heard five shots during the incident.

The local Komo TV station said a park ranger attempted to pull over a car around 10:00 am near Paradise ranger station. The driver ran away but was stopped by another ranger further down the road, where the man opened fire.

The ranger who died was named as 34-year-old Margaret Anderson, whose husband was also a ranger and who had two children.

Ongoing gunfire prevented officers from reaching the victim for nearly three hours, spokesman Ed Troyer of the Pierce County Sheriff's Department told the newspaper.

But a Washington State Patrol trooper said officers were finally able to reach the ranger just before 1:00 pm, and announced her death 20 minutes later, Komo TV reported.

Lee said the weather was good, and on a holiday weekend "we would typically have hundreds of people in the park who would be out enjoying the beautiful scenery and the weather."

But she admitted hunting for the gunman would be difficult once night fell.

"It is just a few hours now until darkness. So, you know, the end of daylight will be the limiting factor in terms of being able to continue searching," she said.

Calls to the office of the park's spokesman and Pierce County police were not immediately returned.

An update on the park's official Twitter feed said: "Sorry but the The Road to Paradise at Longmire has closed until further notice due to emergency operations."