The Senate has passed a bill to make the national anthem gender neutral, fulfilling the dying wish of Liberal MP Mauril Belanger.

The Senate has given its final approval to the legislation, which would change the second line of the anthem from "in all thy sons command" to "in all of us command."

The legislation now only requires formal royal assent before it becomes law.

Story continues below advertisement

Belanger pushed the legislation for years, but it took on far greater urgency after he was diagnosed with ALS, or Lou Gehrig's disease, following the 2015 federal election.

The Commons passed the bill in June 2016, with the ailing Belanger in the House.

The longtime Liberal died just over two months later.

The bill had stalled in the Senate as Conservatives fought its passage, but it won Senate approval on a voice vote Wednesday after a pair of procedural votes.

Following the vote, the office of Conservative Senator Larry Smith sent out a statement saying "so-called Independent senators" had shut down debate "using tools never before applied by individual senators.

"In protest of these illegitimate actions, the Senate Conservative caucus refused to participate in a series of votes this evening," a spokesman for Smith said in the statement.