El Salvador's Supreme Court is putting the brakes on a constitutional change that would bar same-sex marriage.

The ruling blocks lawmakers from ratifying the measure, which also would constitutionally recognize matrimony as being between a man and a woman "born that way" and prohibit same-sex couples from adopting children.

The Legislative Assembly approved the measure in April 2015. For it to be ratified, it would need 56 of the 84 lawmakers in the current assembly to vote in favor.

The Supreme Court ruled Wednesday there were procedural missteps as it was fast-tracked through the assembly and voted on "urgently" with just days left in the session.

The court said that was improper for a constitutional change and there was no opportunity for the public to be informed and weigh in.