Washington (CNN) A bipartisan group of senators introduced legislation Thursday that would prevent the President from leaving North Atlantic Treaty Organization without the Senate's consent.

Democratic Sens. Tim Kaine of Virginia and Jack Reed of Rhode Island as well as Republican Sens. John McCain of Arizona and Cory Gardner of Colorado announced the bill that "formalizes the Senate's opposition to withdrawing from the treaty" on Thursday, according to a statement.

The legislation also gives the Senate Legal Counsel the ability to take the administration to court if it attempts to withdraw from the military alliance without the Senate's say-so.

Concern over President Donald Trump's commitment to NATO has increased significantly following comments he made earlier this month that appeared to call into question the United States' commitment to Article 5 -- the clause that assures military response from member nations.

If Article 5 is invoked by NATO, member countries are required to help defend the allied country under attack, which was brought up during a recent interview Trump had with Fox News.

Read More