CHARLESTON, S.C. (AP) -- Texas Gov. Rick Perry will abandon his presidential bid and endorse Newt Gingrich, two Republican officials said Thursday, a move coming just two days before the pivotal South Carolina primary as Republican front-runner Mitt Romney struggles to fend off a challenge from the former House speaker.

Perry scheduled a news conference Thursday morning in South Carolina to announce his decision.

The officials spoke on the condition of anonymity to avoid pre-empting the announcement.

Perry has faced calls in recent days to drop out of the race to compel conservative voters, whose support has been divided among several conservative candidates, to rally behind Gingrich in hopes of stopping Romney. Recent polls show Gingrich gaining steam heading into Saturday's contest. Romney has benefited thus far from having several challengers who are considered more conservative than him competing for the same segment of voters.

Perry entered the race last August to great fanfare and high numbers in polls. But his standing quickly fell after a series of gaffes and other verbal missteps. Those errors called into question whether the Texas politician who had never lost a race during his three-decade career in elected office was ready for the national stage.

His biggest flub came in a nationally televised debate in early November, when he could not remember the name of the third Cabinet department he pledged to eliminate.

Perry could only manage to say, "Oops." Making fun of himself afterward, he told reporters: "I stepped in it."