A bill that removes one of the last UK-wide sodomy laws has passed unanimously.

The Merchant Shipping (Homosexual Conduct) Bill, which was submitted by Tory MP John Glen, would address one of the last remaining homophobic measures in UK law.

The bill addresses a reference in maritime shipping law that includes “homosexual acts” as grounds for dismissal from the crew of merchant ships.

The provisions, which were introduced when gay sex in the Navy was decriminalised in 1994, are already rendered unenforceable by existing equality law – making the repeal a largely symbolic measure.

The bill achieved a rare distinction today as it became one of the first pieces of legislation on LGBT issues to pass through the House of Commons without any opposition.

The bill was approved on third reading with government support and without a division, as there were no opponents.

Mr Glen said: “The Bill is short and simple. However, what it symbolises and the lasting impact it will have are about more than the repeal of [the regulations.

“The Bill sends the important message that, when it comes to employment in this country, what matters is a person’s ability to do the job, not their gender, age, ethnicity, religion or sexuality. By passing the Bill we make a clear statement that employment discrimination on the basis of sexual orientation has no place in our country. We should not underestimate the importance of that statement.

“It only remains for me to wish the Bill safe passage as it now goes to the [House of Lords], which I hope will share the conviction of this House that employment discrimination on the basis of sexual orientation is wrong and that it is time for the entirety of our statute book fully to reflect that reality.”

Labour’s Andy McDonald added: “Labour Members wholeheartedly support this Bill and what it represents, and I congratulate the hon. Member on introducing it.

“By doing so, he has focused our attention on anachronistic and unfair provisions from the Criminal Justice and Public Order Act 1994, which suggest that it would be lawful to dismiss a seafarer for a homosexual act.

“This Bill would remove ambiguities surrounding whether it is legal to dismiss a seafarer on the basis of such an act, but, as has been pointed out, the discriminatory provisions targeted by the Bill have been superseded by current equality legislation, primarily the 2010 Act.

“The Bill is therefore, ultimately, symbolic, but importantly so, as we should not underestimate the importance and power of symbols.

“We believe that this Bill, which would amend legislation to better reflect the values of equal rights to which we now adhere, is a powerful symbol, and Labour Members are pleased to give it our support.”

Parliamentary Under-Secretary of State for Transport Andrew Jones spoke in favour at a previous sitting.

Explaining government support for the bill, Mr Jones said: “The wording currently on the statute book has no effect, but it represents a historical hangover from when it was possible that a seafarer — indeed, any employee — could be dismissed for being gay.

“That is no longer the case, but the laws that we pass in this place and that form our statute book represent, both practically and in the signals they send, the established morals and values of our country.

“It is right therefore that when the statute book contains wording that is inconsistent with those values we should change that wording.

“For that reason, the Government are happy to state now, formally, that we support this measure.”

The bill will now head to the House of Lords.