After Alabama voted for a near-total ban on abortion, the title of Margaret Atwood’s novel The Handmaid’s Tale began trending on social media, with many opponents drawing comparisons to the dystopian classic.

The US state’s Republican-dominated Senate voted 25-6 for the bill, which, if approved by its governor, would become the country’s most stringent law on terminations of pregnancy.

The bill would block abortions in the event of rape and incest, and features an exception only for when the woman’s health is at serious risk

Within hours, US Google searches for The Handmaid’s Tale were up on previous days and many took to Twitter to make comparisons with the book, which was recently dramatised in a popular TV series.

The story focuses on an imagined future when an authoritarian government named Gilead attains control of the former United States.

With fertility rates falling, those women able to conceive become Handmaids, forced to submit to ritualised rape to bear children for powerful men and their wives.

Writer Caitlin Moran shared an image of the 22 male senators who voted against an exception for rape or incest, adding: “Gilead is being brought to you by the following people.”

Similarly, lawyer Dr Ann Olivarius posted: “They all read The Handmaid’s Tale and thought it was a set of instructions?”

Emmy Bengston, a communications worker for Democratic presidential hopeful Kirsten Gillibrand tweeted a picture showing “Alabama” trending on Twitter, alongside a host of sport-related topics.

Along with it, she wrote: “I keep thinking about the flashback scene in Handmaid’s Tale when the women characters lose their jobs and bank accounts and instinctively know what it means and what’s coming, and most people – especially the men – are kind of oblivious and don’t take it seriously.”

Representative Terri Collins, the bill’s sponsor, said it recognised the “baby in the womb is a person”.

The Republican senators say they are intentionally seeking a conflict with the 1973 landmark US Supreme Court decision Roe v Wade, which legalised abortion nationally, as they hope it will lead to an effort to overturn it across all states.

Meanwhile, British journalist Helen Lewis tweeted: “For anyone horrified by Alabama’s proposed abortion ban, or calling it Gilead. Look closer to home!

“Northern Ireland does not permit abortions even in cases of rape, incest or fatal foetal abnormality. The ONLY exception is endangerment to a woman’s life.”

Abortion laws in the country are devolved to the Northern Ireland Assembly, which has been suspended since 2017.