-- As they joined a vast, traffic-snarled exodus from Houston and the upper Texas Gulf Coast, hundreds of thousands of people fleeing Hurricane Rita were stuck in their cars throughout much of Thursday, with many running out of gas and sweltering on roadsides in 100-degree heat as they waited for authorities to bring them gasoline.

"Now is not a time for warnings; it is a time for evacuation," Houston Mayor Bill White said.

But even as the mayor issued the warning that helped turn many of the freeways in and around the nation's fourth-largest city into a parking lot, the projected trajectory of Hurricane Rita shifted course, with its center moving eastward away from Houston. Although 70- to 90-mph winds and rains were still expected to hit the city by early Saturday, the main path of the storm was aimed near the Texas-Louisiana border.

Throughout the Gulf Coast, communities were evacuated in anticipation of what Thursday night was rated a Category 4 hurricane. As many as 2 million people were urged to leave. Oil refineries buttoned down. Authorities said state and federal emergency management teams and military units were positioned on the fringes of the region.

President Bush said that officials at every level of government "are preparing for the worst," and that the United States has the "resources there to help the federal, state and local officials to respond swiftly and effectively."

Texas Gov. Rick Perry (R) took the unprecedented step of reversing traffic flow on the inbound lanes of several major Houston area freeways so that stalled drivers could move inland. He also ordered gasoline tankers moved to the evacuation routes to give fuel to stranded motorists.

"We will get fuel to those who are low or out," Perry said. "I urge everyone out there to exercise patience."

Houston's mayor acknowledged that the pre-hurricane evacuation preparations, which some Texas officials had been boasting about earlier this week, had gone awry, in part, because too many people attempted to flee the city at once.

White said he had been imploring federal and state officials since early Thursday to reverse traffic flow on the inbound lanes, but that it had only begun to occur by mid-afternoon.

"I would say there will be some learning experiences," the mayor said.

Beaumont, near the Louisiana state line, was virtually deserted Thursday night. "We had the Katrina people in our homes. We saw what they went through. That was lesson enough," said police spokeswoman Crystal Holmes.

In New Orleans, a fresh unease was palpable among the pockets of people who remained.

With a fragile levee system and many water pumps still out of service since Hurricane Katrina three weeks ago, city leaders fear the expected high winds and heavy rain from Rita. Col. Terry Ebbert, head of the city's homeland security department, said that in repairing two levees, crews had to shut down three large pumps. "That means the majority of water that falls in the city will stay in the city," he said.

In Houston, as fears of a direct hit receded Thursday afternoon, the mayor and other officials were reminding residents that they should not evacuate unless they live in low-lying areas likely to be swamped by a storm surge or in mobile homes or other vulnerable housing.

There are about 1.5 million people in Texas who live in areas under mandatory evacuation orders, and it appeared on Thursday afternoon that many of them had spent more than 12 hours in traffic. Moving forward by inches, many drivers had turned off their engines to conserve fuel and were pushing their cars.

On Thursday night, Houston city buses carrying water were dispatched to assist the motorists, and National Guard troops from Fort Hood in Texas were scheduled to arrive about 10 p.m. to deliver fuel. Some motorists abandoned their cars north of Houston and walked to hospitals in search of water.

"We are trying to get out, but there is no way out, now," said Lilly Teng, 45, a lawyer who works for Chevron and lives southeast of Houston in the small town of Seabrook on Galveston Bay.

Teng and her husband and their two children left Seabrook at 11:30 p.m. Wednesday. Fifteen hours later, they had traveled 90 miles.

Trying to get to an interstate that would take them north to relatives in Jackson, Miss., Teng said they were trapped in bumper-to-bumper traffic on a country road near Beaumont. They had turned off the car's engine and were pushing.

"This is an evacuation route. It is not evacuating," said Teng, who said that she and her family were exhausted. "We are ready to go, but we can't go. None of the roads will go. We are taking responsibility to go and stay with family, and we can't get there."

There were also long delays Thursday at George Bush Intercontinental Airport for passengers trying to fly out of Houston. Mayor White said that large numbers of federal Transportation Security Administration employees had failed to show up for work at the airport on Thursday.

Here in Galveston on the Gulf Coast, city officials said that they had evacuated about 3,200 people in 100 buses this week and that 90 percent of the city's 60,000 residents were gone. They also said that new projections of the hurricane's course gave them some hope that Rita would spare Galveston, which in 1900 was hit head-on by one of the deadliest hurricanes in U.S. history, with an estimated 8,000 to 10,000 people killed.

The last buses leaving Galveston loaded up this morning, bound for Huntsville, Tex. Betty Robinson, 44, a bartender at Tony's Lazy Lounge, was on the bus with her mother Nina, 63.

"My mom woke me up this morning, panicking," said Robinson, who had not planned to leave the island. "She was fidgeting and said we got to go. So we called 911, and they came and got us."

Robinson and several others getting on buses here said they had no idea where they will be staying in Huntsville.

There were still a few on this barrier island city who refused to leave.

"If I got to go down, I'm just going to go down," said Helena Avery, 79, sitting on the porch of her dilapidated, one-story shotgun-style house about 10 blocks from the water.

Asked if she had seen on television what happened to elderly people in New Orleans who refused to be evacuated before Hurricane Katrina, Avery said she had.

"Those people were hard-headed like me," she said. Someone might be along today to pick her up, she said, but she had not decided whether to accept the offer. "If I don't, you can say she went down with Rita."

Staff writers Ceci Connolly in New Orleans, Doug Struck in Beaumont, Tex., and Josh White in Washington contributed to this report.

A satellite image shows the position of Hurricane Rita at 4:15 p.m. The storm appeared to be headed slightly east of Galveston and Houston, the National Hurricane Center said.Traffic piles up on northbound Interstate 45 out of Houston as residents obey orders to evacuate ahead of Hurricane Rita.