The Democrat-controlled House of Representatives voted Friday to pass an assault weapons ban, with lawmakers narrowly approving the bill in a 217-213 vote.

Eighteen House Democrats considered to be vulnerable in this year's midterm elections voted in favor of the bill, while two representatives from the party who are facing tough re-election battles – Henry Cuellar of Texas and Jared Golden of Maine – broke from their party to vote against the bill.

The list of vulnerable House Democrats who voted in favor of the bill includes Rep. Sharice Davids, D-Kan., Rep. Elissa Slotkin, D-Mich., Rep. Dan Kildee, D-Mich., Rep. Angie Craig, D-Minn., Rep. Annie Kuster, D-N.H., Rep. Chris Pappas, D-N.H., Rep. Dina Titus, D-Nev., Rep. Susie Lee, D-Nev., Rep. Steve Horsford, D-Nev., Rep. Marcy Kaptur, D-Ohio, Rep. Matt Cartwright, D-Pa., Rep. Elaine Luria, D-Va., Rep. Abigail Spanberger, D-Va., Rep. Kim Schrier, D-Wash., Rep. Cindy Axne, D-Iowa, Rep. Susan Wild, D-Pa., Rep. Tom Malinowski, D-N.J., and Rep. Tom O’Halleran, D-Ariz.

ASSAULT WEAPONS BAN PASSED IN HOUSE OF REPRESENTATIVES

Democratic Texas Rep. Henry Cuellar walks on Capitol Hill

Rep. Henry Cuellar, D-Texas, is seen after a meeting of the House Democratic Caucus in the U.S. Capitol, June 8, 2022. (Tom Williams/CQ-Roll Call, Inc via Getty Images)

According to the bill's summary, the Assault Weapons Ban of 2022 would make it illegal to "knowingly import, sell, manufacture, transfer, or possess a semiautomatic assault weapon (SAW) or large capacity ammunition feeding device (LCAFD)."

The issue of gun control became a front and center issue in discussions surrounding the midterms following a number of tragic mass shootings in recent months, including at a Buffalo, New York supermarket and at an Uvalde, Texas elementary school.

The shooting events lead to revamped calls from a number of activists and Democrat members of Congress to ban "assault weapons" and enact stricter gun control measures, such as expanded background check laws and red-flag laws.

SUPPORT FOR ‘ASSAULT WEAPONS’ BAN HITS ALL-TIME LOW FOLLOWING UVALDE SHOOTING: POLL

President Biden has called on the Senate to pass the measure, insisting that a majority of Americans favor the "common sense action."

President Biden speaks at the White House after ending his COVID-19 isolation

President Biden speaks in the Rose Garden of the White House in Washington, Wednesday, July 27, 2022. (AP Photo/Susan Walsh)

"The majority of the American people agree with this common sense action. The should Senate move quickly to get this bill to my desk, and I will not stop fighting until it does. There can be no greater responsibility than to do all we can to ensure the safety of our families, our children, our homes, our communities, and our nation," Biden said. "Today, House Democrats acted by unifying to pass an assault weapons ban to keep weapons of war off our streets, save lives in this country, and reduce crime in our communities."

The effort to enact such measures culminated in Friday's vote in the House despite polls showing a growing number of Americans opposed to banning "assault weapons," in addition to just small portion of voters with gun control as a high priority as they decide for whom to caste their vote.

According to a Suffolk University poll of registered voters released this week, just 3.4% of voters said gun control was the most important issue for them going into the midterms

A separate poll released in June showed support for an "assault weapons" among registered voters at an all-time low.

CLICK HERE TO GET THE FOX NEWS APP

Nancy Pelosi press conference

House Speaker Nancy Pelosi speaks during a news conference at the US Capitol in Washington, D.C., July 29, 2022. (Ting Shen/Bloomberg via Getty Images)

During a speech on the House floor on Friday, Speaker Nancy Pelosi said that the assault weapons ban is past-due.

"Our nation has watched in unspeakable horror as assault weapons have been used in massacre after massacre in communities across the country," she said. "Disturbingly, so many of these mass shootings have targeted our precious children. In their schools, at the movies, at the malls and throughout our communities. That is why I rise today in strong support in reinstating the assault weapons ban, a long-overdue step to get deadly weapons off our streets."

Fox News' Adam Sabes and The Associated Press contributed to this article.