The House of Representatives has passed a piece of legislation which bans abortions after 20 weeks in the US.

The bill, which is backed by Donald Trump, will make it illegal to either carry out or attempt an abortion after 20 weeks of pregnancy. Those found performing abortions after this threshold will be liable to be fined or sentenced to up to five years in prison.

Members of the House largely voted on party lines and the measure passed the House by a vote of 237 for and 189 against.

The Pain-Capable Unborn Child Protection Act, which is similar to legislation that failed in 2013 and 2015, allows exceptions in cases where a woman’s pregnancy poses a risk to her life or if the child is conceived as a result of rape or incest.

In a statement released on Monday, the White House said it "strongly supports" the bill and "applauds the House of Representatives for continuing its efforts to secure critical pro-life protections."

President Trump revealed his support for the bill prior to entering the White House. In a letter dated September 2016 that was sent to anti-abortion leaders inviting individuals to join the campaign's "Pro-Life Coalition," the billionaire property developer said he was committed to "signing into law the Pain-Capable Unborn Child Protection Act, which would end painful late-term abortions nationwide".

Iran's 'Trumpism' contest Show all 10 1 /10 Iran's 'Trumpism' contest Iran's 'Trumpism' contest A picture taken on July 3, 2017 shows a cartoon of US President Donald J. Trump and First Lady Melania Trump on display at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest An Iranian woman looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest An Iranian woman looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest Iranian cartoonist Hadi Asadi poses for a picture with a trophy and an award next to cartoons of US President Donald J. Trump, at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest Iranians look at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest An Iranian woman looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest Iranian reformist cleric Mahmoud Doaei looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest An Iranian man looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest An Iranian woman looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest Iranian reformist cleric Mahmoud Doaei looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images

But the bill is likely to struggle in the tightly divided Senate as it does not look probable the Senate Republicans, who only hold a 52-seat majority, would be able to amass the 60 votes required to park the bill on President Trump's Oval Office desk.

House Majority Leader Kevin McCarthy last week argued the legislation "will respect the sanctity of life and stop needless suffering."

"It will protect those children who science has proven can feel pain, and give them a chance to grow and live full and happy lives," Mr McCarthy said in a statement. "We have an obligation to speak and defend for those who can't speak for themselves."

Anti-abortion groups, who see this measure as one their chief priorities, claim a fetus can feel pain at 20 weeks or later but opponents argue the measure is founded on “junk science”.

"It’s past time for Congress to pass a nationwide law protecting unborn children from the unspeakable cruelty of late-term abortion," said Marjorie Dannenfelser, president of the Susan B Anthony List, an anti-abortion group based in Washington DC.

Abortion rights groups have fiercely condemned the measure. “The agenda behind this bill is clear: to shame women and to ban safe, legal abortion," said Dana Singiser, vice president for government relations and public policy for Planned Parenthood.

"This dangerous, out-of-touch legislation is nothing more than yet another attempt to restrict women's access to safe, legal abortion," Planned Parenthood Action Fund said in a statement.

They added: "20-week bans are unconstitutional. 20-week bans are a clear attempt to erode Roe v Wade. In fact, 20-week ban proponents are outspoken about their goal to challenge the 1973 Supreme Court decision protecting a woman's right to safe and legal abortion."

Roe v Wade is the landmark Supreme Court decision which legalised abortion nationwide in the early 1970's. In his first interview after winning the election, the billionaire said he wanted to appoint “pro-life” judges with the goal of overturning Roe v Wade “automatically”.

Abortion has long been a partisan issue in the US but the divisive nature of it has gone into overdrive under the Trump presidency. Some of President Trump's chief advisers, including Vice President Mike Pence, are outspokenly opposed to abortion.

What’s more, anti-abortion campaigners celebrated Mr Trump’s Supreme Court pick, Neil Gorsuch. In the time President Trump has been in the White House, women's rights group have accused the president of waging a war on women’s healthcare.

Mr Trump demonstrated his commitment to anti-abortion policies on his fourth day in office - he signed an executive order barring US funding for any international aid groups which give women information about abortion, even if they do not perform the procedures.