Updated

Houston Texans linebacker Mario Williams, out for the rest of the season with a torn pectoral muscle, had surgery on Friday.

The former No. 1 overall pick was hurt during the first quarter of Sunday's 25-20 loss to Oakland.

"Mario's surgery went well," Texans defensive coordinator Wade Phillips said Friday. "We talked to the doctor, he had it today and they said everything went well and he's in good spirits."

Williams, who was placed on injured reserve, recorded his fifth sack of the season on Raiders quarterback Jason Campbell before leaving Sunday's game. Rookie linebacker Brooks Reed is taking his place in the starting lineup.

Phillips said Williams' successful surgery was "good news for him for the long term."

"Short term," the coordinator said, "certainly we got to get ready to play. We know it's going to be a tough game, but we prepared well and we worked hard and we're ready to go."

The Texans are gearing up for a road game against the Baltimore Ravens and should have quarterback Matt Schaub, who practiced for the second straight day after sitting out Wednesday with a sore shoulder and thigh bruise.

Williams, 26, has 241 tackles and 53 sacks since he was drafted by the Texans in 2006. Prior to his injury, he missed only three of a possible 85 NFL games and started the other 82.