The Illinois House of Representatives has passed legislation that would require people to be 21 years old to buy or possess assault-style weapons.

The legislation was approved in the House on Wednesday by a margin of 64 to 51, The Associated Press reported.

Under the legislation, people under the age of 21 would not be able to buy or possess high-capacity weapons and attachments or .50-caliber rifles and cartridges.

ADVERTISEMENT

The vote comes after 17 people were killed Feb. 14 when a gunman opened fire at a high school in Florida.

Since the shooting, students have been demanding that lawmakers act to prevent another school shooting.

Students who survived have been rallying lawmakers in Florida's state capital and have planned a march later this month in Washington, D.C., to rally against gun violence.

President Trump Donald John TrumpBiden leads Trump by 36 points nationally among Latinos: poll Trump dismisses climate change role in fires, says Newsom needs to manage forest better Jimmy Kimmel hits Trump for rallies while hosting Emmy Awards MORE on Wednesday shook up the gun control debate with a televised White House meeting with lawmakers that lasted more than an hour.

Trump expressed support for a number of gun control measures, including strengthened background checks and stricter age limits, even as he held fast to his insistence schools should be made "harder."