A statement released by the campaign said that Bristol Palin will keep her baby and marry the child's father. Bristol Palin's baby is due in late December.
"Our beautiful daughter Bristol came to us with news that as parents we knew would make her grow up faster than we had ever planned. We're proud of Bristol's decision to have her baby and even prouder to become grandparents," Sarah and Todd Palin said in the brief statement.
The disclosure of the pregnancy came on the opening day of the Republican National Convention, scaled back because of Hurricane Gustav, and three days after McCain named Palin as his running mate. Other news was likely to overshadow the disclosure.
"Bristol and the young man she will marry are going to realize very quickly the difficulties of raising a child, which is why they will have the love and support of our entire family," they added. The father was identified in the statement as Levi, but the campaign said it was not disclosing his last name or age.
Sarah Palin's fifth child, a son named Trig, was born in April with Down syndrome. Internet bloggers have been suggesting that the child was actually born to Bristol Palin but that her mother, the 44-year-old Alaska governor, claimed to be the mother.
Palin spokesman Bill McAllister emphatically denied those rumors, and McCain adviser Mark Salter said the campaign announced the daughter's pregnancy to rebut them.
"Senator McCain's view is this is a private family matter. As parents, (the Palins) love their daughter unconditionally and are going to support their daughter," said McCain spokesman Steve Schmidt.
"Life happens," he said.
"An American family," added Salter.
The advisers said Palin told them about the pregnancy during lengthy discussions about her background. At several points during the discussions, McCain's team warned Palin that the scrutiny into her private life would be intense and that there was nothing she could do to prepare for it.
Prominent religious conservatives, many of whom have been lukewarm toward McCain's candidacy, predicted that Palin's daughter's pregnancy would not diminish conservative Christian enthusiasm over the vice presidential hopeful.
"I think it's a very private matter," said Roberta Combs, president of the Christian Coalition of America. "It's a matter that should stay in the family and they have to work through it together. My prayers go out to them."
Added Combs: child in the spotlight. She's not running for office. When someone can't face issues, they try to tear down a family."
Associated Press Writers Eric Gorski in St. Paul and Steve Quinn in Anchorage, Alaska, contributed to this report.