MIAMI — Florida lawmakers voted to prohibit abortions after six weeks of pregnancy on Thursday, culminating a rapid effort by elected Republicans and Gov. Ron DeSantis to transform the state to one of the most restrictive in the country.

Mr. DeSantis, a likely 2024 Republican presidential contender, said on Twitter Thursday night that he had signed the new ban, which will end Florida’s long-held role as a destination for women from across the Deep South seeking abortions and force them to travel farther, to states such as North Carolina or Illinois, for care.

In the six months after the Supreme Court overturned the federal right to abortion last year, no state saw a greater increase in the number of legal abortions performed each month than Florida, according to a report released on Tuesday.

“For the past 50 years, we’ve had a culture grow in this nation — a culture of abortion for any reason at any time,” State Representative Jenna Persons-Mulicka, a Fort Myers Republican, said before the 70-40 vote. “Today we lead. Today we stand for life. We stand with mothers, and we stand with Florida families. And by your vote today, we change the culture of abortion to a culture of life.”

Seven Republicans, mostly from Southeast Florida and the Tampa area, broke with their party and voted against the ban. Nine representatives did not vote.

Mr. DeSantis signed the six-week ban despite the complicated politics the issue presents. The new restriction would help him, to an extent, with conservative Republicans in a presidential primary but would likely be far less appealing to many moderate Republicans and independent voters in a general election.

Prohibiting abortion at that stage in pregnancy would have not long ago seemed unthinkable in Florida, which until recently was a swing state governed from near the political center, rather than the far right.

The new ban is among several sweeping and divisive measures adopted over the past month by the Florida Legislature, which was empowered by Mr. DeSantis’s landslide re-election victory. The governor has signed laws allowing people to carry concealed weapons without a permit and broadly expanding school vouchers. State senators passed a bill banning medication and surgery for children seeking gender transitions and another prohibiting children from attending certain drag shows.

Approval of the six-week abortion ban by the Florida House of Representatives was a foregone conclusion on Thursday. Still, over more than seven hours of discussion, Democrats offered dozens of amendments, none of which were adopted. Protesters interrupted the tense discussion, prompting Republican leaders to clear the viewing gallery. The demonstrators briefly gathered outside the chamber, chanting, “Hands off our bodies!”

As recently as a year ago, Florida allowed abortions until 24 weeks of pregnancy. Then, last spring, Mr. DeSantis and state lawmakers limited access to the procedure after 15 weeks, a major change that took effect in July and is still being legally challenged. The new six-week ban is contingent, in part, on whether the Florida Supreme Court upholds the 15-week restriction.

In the past, the court has ruled that the explicit right to privacy guaranteed by the State Constitution protects abortion rights. But that was before Mr. DeSantis appointed several more conservative justices, who have shifted the court’s ideological balance.

Most of the 13 states that prohibit almost all abortions are in the South, including Alabama, Mississippi and Louisiana. Florida would now join Georgia at the next-most-restrictive level with the six-week ban, around the time when fetal cardiac activity can be detected. At that gestation stage, many women do not yet realize that they are pregnant.

At the same time, dueling court rulings and legal challenges over the use of an abortion drug have made the future of medication abortions unclear.

Mr. DeSantis’s signature on the Florida ban would keep the Republican Party pressing deeper into abortion restrictions, even as some of the party’s activists are pleading with politicians to step back. Senator Tim Scott, a South Carolina Republican who announced a presidential exploratory committee on Wednesday, said he would back a nationwide ban on abortions at 20 weeks — a position framed as a moderate middle ground but one that Democrats nonetheless seized on to frame the recent anti-abortion drive as a threat to Democratic states.

David Winston, a veteran pollster for the House Republican leadership, worried that Republican politicians, pressed by conservative activists, were moving much faster than most voters want.

“People are trying to take next steps without taking a step back and asking, How do we get to decisions that would seem to voters to be a reasonable next step?” he said.

But Katie Glenn Daniel, state policy director for the anti-abortion group Susan B. Anthony Pro Life America, said such concerns were overblown, noting Republicans’ electoral victories in Florida last year after the 15-week ban was adopted.

“What we see is that when candidates stake out a position, are clear about that position and don’t let their opponents define them because they’ve taken the ostrich position, burying their heads in the sand and hoping they go away, they do well,” she said.

While legal abortions in the United States fell by 6 percent in the six months after the decision overturning Roe v. Wade — Dobbs v. Jackson Women’s Health Organization — Florida recorded the largest numerical increase of any state: 1,200 a month. The share of all U.S. abortions performed there, moreover, increased to 9.5 percent, from 7.5 percent, trailing only California and New York, according to a report from WeCount, a research project from the Society of Family Planning, which supports abortion rights.

In Tallahassee, the Planned Parenthood health center has seen a doubling of abortion patients since the Dobbs decision. In all, the number of out-of-state patients seeking abortions has quadrupled at nine Planned Parenthood health centers along the state’s northern border and east coast.

Should a six-week abortion ban become law, access would be far more difficult.

According to data compiled by Caitlin Myers, an economist at Middlebury College, the average driving distance to the closest abortion provider in Florida is 22 miles, or about half an hour. A six-week ban would make it 607 miles, or more than nine hours.

There were 54 abortion providers in Florida at the end of 2022, according to data from Advancing New Standards in Reproductive Health at the University of California, San Francisco. There are only a handful of providers, by contrast, in the two other states in the Southeast where abortion remains more accessible, for now — South Carolina and North Carolina.

Since the United States Supreme Court overturned Roe last summer, Democrats have won elections that centered on abortion rights in other states, including this month in Wisconsin, where voters chose a liberal candidate for the State Supreme Court who all but promised that she would help reverse an 1849 abortion ban.

But in Florida, Republicans won handily last November, even after Democratic candidates pressed the abortion issue.

Mr. DeSantis, however, rarely brought up abortion during his re-election campaign and has continued to emphasize other issues, a tacit acknowledgment that, as past public opinion polls have shown, a majority of Floridians — and of Americans — want to keep most abortions legal.

Florida’s 15-week abortion ban became law last year before the overturning of Roe v. Wade. That decision led abortion opponents to step up pressure on the state to go even further in restricting the procedure. Republicans, who hold supermajorities in both legislative chambers, introduced the six-week prohibition in March, on the first day of the annual lawmaking session.

In Thursday’s debate, Democrats argued that the ban would force women to seek care in other states or to see their pregnancies through. That would have a profound effect on marginalized and vulnerable communities, they said.

Democrats also recounted the stories of Florida women who have publicly discussed over the past year how they have had to carry nonviable pregnancies because doctors would not terminate them. State Representative Robin Bartleman, a Weston Democrat who last year said she agonized over whether to end a pregnancy with a fatal fetal abnormality, tearfully shared her experience again.

“Do you know how painful that was?” she said. “Do you know how terrible that was? No one here belonged in that room with me.”

Republicans argued that they were saving lives.

“I favor an outright ban on abortion,” said State Representative Mike Beltran, a Riverview Republican. “This is a compromise. For every person who thinks this goes too far, there are folks who feel that it doesn’t go far enough.”

The State Senate approved the ban this month with a vote of 26-13. Two freshman Republicans, Senators Alexis Calatayud of Miami and Corey Simon of Tallahassee, joined Democrats in voting no.

“I gave them my word that I would support Florida’s current law of 15 weeks,” Ms. Calatayud said of her constituents. Mr. Simon expressed a similar sentiment.

Later that day, the police in Tallahassee arrested 11 people who were protesting the legislation outside City Hall, which is across the street from the Florida Capitol, including the chairwoman of the Florida Democratic Party and the Senate minority leader.

The six-week ban would take effect 30 days after the Florida Supreme Court either upholds the 15-week ban from last year, reinterprets the privacy clause in the State Constitution or revisits prior cases to decide that the clause does not apply to abortion rights. Alternatively, if Florida were to amend the State Constitution to say the privacy clause does not apply to abortion rights, the six-week restriction would also take effect 30 days later.

The six-week ban would provide exceptions for abortions to take place until 15 weeks for pregnancies that resulted from rape, incest or human trafficking, as long as the woman provides documentation such as a restraining order, medical record or police report. The 15-week ban passed last year included exceptions only for a fatal fetal abnormality or to save the life of the woman.

The new law would also prohibit doctors from prescribing medication abortions through telehealth, making Florida’s six-week ban even more restrictive than Georgia’s, according to Kaiser Family Foundation, and from dispensing the pills by mail. And it would bar state funds from being used for a person to travel outside of Florida for an abortion, except for when it is a medical emergency or when federal law requires it.

To groups that oppose abortion, the anticipated six-week ban is a welcome victory.

“When the governor signs this, it is going to make a huge impact,” said Ingrid Duran, director of state legislation for the National Right to Life Committee.

By contrast, Sarah Parker, president of Women’s Voices of Southwest Florida, a nonprofit that defends reproductive rights, started camping out on Monday night in Tallahassee as part of a weeklong protest.

“This is going to affect millions of people,” she said. “And if it’s not happening in your state, it will.”

Jonathan Weisman and Eduardo Medina contributed reporting.