MPs look set to debate a change in the law to allow royals in same-sex relationships to marry or be in civil partnerships and for their children to be recognised as the heir to the throne.

Parliament is due to pass legislation shortly to allow for the first child of Prince William, the Duke of Cambridge and Catherine, the Duchess of Cambridge to rule as monarch regardless of whether they are a boy or a girl. Now Labour MP Paul Flynn is gathering support for an amendment that will extend the protection to include the eventuality that the child is gay or lesbian.

If accepted, the change to the law could lea to the reign of an openly gay or lesbian king or queen and for their same-sex partner to be recognised as consort. Any children born to the couple through artificial insemination or surrogacy would succeed to the throne so long as the couple are in a same-sex marriage or civil partnership. Current inheritance laws mean that if the couple had a child through adoption, they would not join the line of succession for the throne and it is not clear MPs would seek to change this.

In order to secure a full debate, the amendment needs to be accepted by John Bercow, the speaker of the House of Commons, almost certain as he is a strong supporter of LGBT rights. It is expected to have the support of many Labour, Liberal Democrats and most Conservatives that back David Cameron’s plans to introduce same-sex marriage.

The amendment would be to a law that as well as making inheritance gender neutral, will allow future royal babies to marry Catholics if they wish although the royal must remain in the Church of England.

The issue is likely to be a complex one as the ruling monarch is also the Supreme Governor of the Church of England. The Church is currently officially opposed to same-sex marriage.