COLUMBIA, S.C. - South Carolina's Supreme Court ordered Gov. Mark Sanford yesterday to request $700 million in federal stimulus money aimed primarily at struggling schools, ending months of wrangling with legislators who accused him of playing politics with people's lives.

The nation's most vocal anti-bailout governor had refused to take the money designated for the state over the next two years, facing down protesters and legislators who passed a budget requiring him to do so.

While other Republican governors took issue with requesting money from the $787 billion federal stimulus package, Sanford was the first to defend in court his desire to reject the money.

But he said yesterday that he would not appeal the court ruling and planned to sign paperwork Monday to request the money.

Educators hailed the court ruling. They had predicted that hundreds of teachers would lose jobs and that colleges would see steep tuition increases without the money, though sharp budget cuts will still take a toll.

The stimulus fight raised the profile of Sanford, chairman of the Republican Governors Association, and provoked talk of a 2012 presidential bid. But at home, the episode became a power struggle between Sanford and the Republican-dominated legislature.

The former congressman objected to the stimulus money on several levels that were consistent with his small-government, anti-spending stances. He contends it will devalue the dollar and increase debt.