Hurricane Rita closed in on the fourth-largest US city and the heart of the country's oil-refining industry with howling 145 mph (233 kph) winds Thursday, but a sharper-than-expected turn to the right set it on a course that could spare Houston and nearby Galveston a direct hit. The storm's march toward land sent hundreds of thousands of people fleeing the nation's fourth-largest city in a frustratingly slow, bumper-to-bumper exodus. "This is the worst planning I've ever seen," said Judie Anderson, who covered just 45 miles (72 kilometers) in 12 hours after setting out from her home in the Houston suburb of LaPorte. "They say we've learned a lot from Hurricane Katrina. Well, you couldn't prove it by me." In all, nearly 2 million people along the Texas and Louisiana coasts were urged to get out of the way of Rita, a 400-mile (644-kilometer)-wide storm that weakened Thursday from a top-of-the-scale Category 5 hurricane to a Category 4 as it swirled across the Gulf of Mexico. The storm's course change could send it away from Houston and Galveston and instead draw the hurricane toward Port Arthur, Texas, or Lake Charles, Louisiana, at least 60 miles (97 kilometers) up the coast, by late Friday or early Saturday. But it was still an extremely dangerous storm _ and one aimed at a section of coastline with the nation's biggest concentration of oil refineries. Environmentalists warned of the possibility of a toxic spill from the 87 industrial plants and storage installations that represent more than one-fourth of US refining capacity. Rita also brought rain to already-battered New Orleans, raising fears that the city's Katrina-damaged levees would fail and flood the city all over again. At 5 p.m. EDT (2100 GMT), Rita was centered about 405 miles (652 kilometers) southeast of Galveston and was moving at near 9 mph (14.5 kph). Its winds were near 140 mph (225 kph), down from 175 mph (282 kph) earlier in the day. Forecasters predicted it would come ashore somewhere along a 350-mile (563-kilometer) stretch of the Texas and Louisiana coast that includes Port Arthur near the midpoint. Forecasters warned of the possibility of a storm surge of 15 to 20 feet, (4 1/2 to 6 meters), battering waves, and rain of up to 15 inches (38 centimeters) along the Texas and western Louisiana coast. The evacuation was a traffic nightmare, with red brakelights streaming out of Houston and its low-lying suburbs as far as the eye could see. Highways leading inland out of Houston, a metropolitan area of 4 million people, were clogged for up to 100 miles (160 kilometers) north of the city. Drivers ran out of gas in 14-hour traffic jams or looked in vain for a place to stay as hotels filled up all the way to the Oklahoma and Arkansas line. Others got tired of waiting in traffic and turned around and went home. Service stations reported running out of gasoline, and police officers along the highways carried gas to motorists whose tanks were on empty. Texas authorities also asked the Pentagon for help in getting gasoline to drivers stuck in traffic. Rather than sit in traffic, some people walked their dogs, got out to stretch or switch drivers, or lounged in the beds of pickup trucks. Fathers and sons played catch on freeway medians. Some walked from car to car, chatting with others. With temperatures in the 90s, many cars were overheating, as were some tempers. "I've been screaming in the car," said Abbie Huckleby, who was trapped on Interstate 45 with her husband and two children as they tried to get from the Houston suburb of Katy to Dallas, about 250 miles (402 kilometers) away. "It's not working. If I would have known it was this bad, I would have stayed at home and rode out the storm at home." Trazanna Moreno decided to do just. After leaving her Houston home and covering just six miles in nearly three hours, she finally gave up. "It could be that if we ended up stranded in the middle of nowhere that we'd be in a worse position in a car dealing with hurricane-force winds than we would in our house," she said. To speed the evacuation, Gov. Rick Perry halted all southbound traffic into Houston along I-45 and took the unprecedented step of opening all eight lanes to northbound traffic out of the city for 125 miles (201 kilometers). I-45 is the primary evacuation route north from Houston and Galveston. Perry urged evacuees to stay calm and be patient. "You've done the right thing by leaving two days before Hurricane Rita makes landfall," he said. "You will get out of the coastal region on time. It's just going to take some time." In Galveston, a city rebuilt after an unnamed 1900 hurricane killed between 6,000 and 12,000 residents in what is still the deadliest natural disaster in US history, the once-bustling tourist island was all but abandoned, with at least 90 percent off its 58,000 residents cleared out. The city pinned its hopes on its 11-mile-long, 17-foot(5-meter)-high granite seawall to protect it from the storm surge, and a skeleton crew of police and firefighters to ward off potential looters. "Whatever happens is going to happen and we are going to have a monumental task ahead of us once the storm passes," said City Manager Steve LeBlanc. "Galveston is going to suffer and we are going to need to get it back in order as soon as possible." The last major hurricane to strike the Houston area was Category-3 Alicia in 1983. It flooded downtown Houston, spawned 22 tornadoes and left 21 people dead. At Houston's Johnson Space Center, NASA evacuated its staff, powered down the computers at Mission Control and turned the international space station over to the Russian space agency. Along the coast, petrochemical plants began shutting down and hundreds of workers were evacuated from offshore oil rigs. Environmentalists warned of a worst-case scenario in which a storm surge pushed spilled oil or chemicals from the bayous into the city of Houston itself, inundating mostly poor, Hispanic neighborhoods on its south side. Perry said state officials had been in contact with plants that are "taking appropriate procedures to safeguard their facilities." In New Orleans, Rita's steady rains Thursday were the first measurable precipitation since Katrina. The forecast was for three to five inches in the coming days - dangerously close to the amount engineers said could send floodwaters pouring back into neighborhoods that have been dry for less than a week. "Right now, it's a wait-and-see and hope-for-the-best," said Mitch Frazier, a spokesman for the Army Corps of Engineers, which added sandbags to shore up levees and installed 60-foot (18-meter) sections of metal across some of the city's canals to protect against storm surges. But as the rain fell, there were ominous signs it might not be enough. In the city's lower Ninth Ward, where water broke through a levee earlier this month and caused some of the worst flooding, there was standing water a foot deep in areas that were dry a day earlier. Katrina's death toll in Louisiana rose to 832 on Thursday, pushing the body count to at least 1,069 across the Gulf Coast. But workers under contract to the state to collect the bodies were taken off the streets of New Orleans because of the approaching storm. In southwestern Louisiana, anywhere from 300,000 to 500,000 residents along the state's southwest coast were urged to evacuate and state officials planned to send in buses to take refugees, some of whom had already fled Katrina. "Rita has Louisiana in her sights," Louisiana Gov. Kathleen Blanco said. "Head north. You cannot go east, you cannot go west. If you know the local roads that go north, take those." As for those who refuse to leave, she said: "Perhaps they should write their Social Security numbers on their arms with indelible ink." National Guard and medical units were put on standby. Helicopters were being positioned, and search-and-rescue boats from the state wildlife department were staged on high ground. Blanco said she also asked for 15,000 more federal troops. The US mainland has not been hit by two Category 4 storms in the same year since 1915. Katrina came ashore Aug. 29 as a Category 4.