Two Republican candidates who made controversial remarks about rape and abortion during the US election campaign have both been defeated in their campaign to join the Senate.

Richard Mourdock in Indiana lost to Democrat Joe Donnelly while Congressman Todd Akin lost out to Democrat incumbent senator Claire McCaskill in Missouri.

The losses of the two candidates - and the Maine seat going to independent candidate Angus King - hit Republican chances of capturing the Senate from the Democrats.

Mr Mourdock, who is strongly anti-abortion under any circumstances, shocked both Republicans and Democrats by saying during the campaign that if a pregnancy occurred as a result of rape it was "a gift from God".

"I struggled with it myself for a long time," the would-be senator said. "But I came to realise that life is that gift from God, and I think even when life begins in that horrible situation of rape, that it is something God intended to happen."

The only exception to an outright ban on abortion was if the life of the mother was at stake, he insisted.

Mr Akin was expected to win the Missouri seat until his comments in August about "legitimate rape" caused outrage.

Senator Tammy Baldwin speaking to supporters following her success

Mr Akin said on TV that he believed women's "natural" defences would prevent them getting pregnant if they really had been raped.

Politicians from his own party called for him to drop out of the election race but, while he apologised for his remarks, he refused to withdraw from the campaign.

Video:US Senate Candidate's Rape Gaffe

In a tight race in Wisconsin, Democrat congresswoman Tammy Baldwin prevailed in a close race with former Governor Tommy Thompson and will become the first openly gay US senator.

In Massachusetts, Republican Scott Brown, who managed to win the Senate seat after the death of Ted Kennedy in 2009, was defeated by Democrat Elizabeth Warren.

But the results mean the newly re-elected President Barack Obama will still have to deal with a divided Congress.

The Democrats retain control of the Senate, while Republicans keep a solid control of the House of Representatives.

Before the election, the Republicans had hoped to win the Senate in which they held 47 seats to the Democrats 53. That, now, is impossible.

Video:Todd Akin's Rape Apology TV Ad

But the Republicans are sure of keeping control of the House which has a total of 435 seats. Although the Democrats made a few gains, the Republicans still have a commanding lead.

House Speaker John Boehner, who gets to keep his job, said voters made clear there is no mandate for raising taxes.