Tennessee lawmakers have passed a bill backed by the state’s Republican governor that would ban abortions after a fetal heartbeat is detected. Early Friday morning, the Tennessee Senate approved the bill, 23-5, after the House had passed the legislation earlier, 68-17. Republicans control both chambers. The legislation – which prompted immediate legal action from several abortion rights groups – effectively bans abortion after a fetal heartbeat is detected, as early as six weeks, through 24 weeks into a pregnancy. The bill would make exceptions to protect the life of the woman, but not for instances of rape or incest. Abortions after viability, which is around 24 weeks, are already illegal in Tennessee except in cases where the woman’s life is in danger. The Tennessee bill punishes abortion providers with up to 15 years in jail and a $10,000 maximum fine. It also prohibits an abortion where the doctor knows the woman is seeking an abortion because of the child’s race, sex, or a diagnosis indicating Down syndrome. Under the bill, a doctor would have to inform the pregnant woman of the gestational age, perform an ultrasound and display the images, and check for a fetal heartbeat and play it out loud before proceeding. The woman can decline to view the images or hear the heartbeat. The bill also requires abortion providers who provide more than 50 abortions a year to post notices that medication abortion involving a two-drug process could be reversed if the second pill has not been taken, though claims of potential abortion reversal are “not based on science and do not meet clinical standards,” according to the American Congress of Obstetricians and Gynecologists. The American Civil Liberties Union, the Center for Reproductive Rights, Planned Parenthood and several Tennessee abortion providers challenged the bill in federal court on Friday afternoon, filing suit against Tennessee Attorney General Herbert Slatery and other state officials. “Existing Tennessee law already proscribes abortion after viability,” the groups wrote, asking a judge to block the bill from going into effect. “Therefore, the only application of each of the (bill’s provisions) is to unconstitutionally ban pre-viability abortions.” Samantha Fisher, Slatery’s communications director, initially told CNN the office was reviewing the complaint, but later said it hadn’t arrived yet. “Apparently a lawsuit has been filed before the law has even gone into effect,” she added. “It was just passed this morning and the governor has not even signed it.” The Tennessee bill comes as several red states have passed restrictive abortion laws with the hopes of forcing a broad court challenge to the 1973 landmark Supreme Court decision in Roe v. Wade that legalized abortion nationwide. At least eight other states, with Republicans in control of the legislature, passed abortion restrictions last year based on gestational limits. Judges have blocked all of the laws that have been taken up in state-level challenges. Tennessee Republicans acknowledged that this legislation is a “risk,” so to protect against legal challenges and if a court strikes down the six-week ban, the bill includes a “ladder” provision, which would generate new prohibitions, adding add two weeks of gestation if the previous bill is turned back by the courts. Speaking with CNN later, Senate Democratic Leader Jeff Yarbro decried Republicans’ move to pass the bill around midnight, calling it the “most appalling departure from democratic norms I’ve seen while serving in the legislature.” According to Yarbro, up to the bill’s passage, the Capitol building was closed to the public and the Senate had suspended its rules. Yarbro also claimed that the bill was never printed on any public notice nor any calendar for the Senate this month. Yarbro told CNN that the Senate had only planned to address legislation that was time-sensitive, related to coronavirus, or necessary to pass the budget. And because of that, he said, Democrats weren’t given sufficient time to examine the 60-page bill, propose amendments, or engage in questioning. CNN has reached out to Senate Republican Leader Jack Johnson, who was the bill’s chief sponsor in the Senate, but has not heard back. The American Civil Liberties Union of Tennessee on Friday promised a legal challenge, calling the measure a “dangerous, flatly unconstitutional bill.” “It is a disgrace that in the face of a true public health crisis, Tennessee politicians wasted their time with this last-minute move to attack abortion access before closing up shop this session,” the acting President of Planned Parenthood, Alexis McGill Johnson, said in a statement Friday. The president and CEO of the Planned Parenthood’s Tennessee chapter, Ashley Coffield, claimed that the vote came after “weeks of Senate leadership making public statements that they would not take up this bill.” The Tennessee House last year passed a heartbeat bill, but it failed to pass the state Senate. Republican Gov. Bill Lee had proposed this new legislation in January, saying at the time, “I believe that every human life is precious, and we have a responsibility to protect it.” Lee on Friday celebrated the bill’s passage, calling it the “strongest pro-life law in our state’s history.” “One of the most important things we can do to be pro-family is to protect the rights of the most vulnerable in our state, and there is none more vulnerable than the unborn,” Lee wrote on Twitter. The governor has 10 days to sign the bill, issue a veto, or allow it to become law without his signature. CNN has reached out to Lee’s office for comment. This story has been updated with additional comment and reaction.