El Salvador's Supreme Court has blocked a change to the nation's constitution that would bar same-sex marriage.

According to the AP, the nation's highest court blocked lawmakers from ratifying the measure.

The constitutional change would recognize marriage as a heterosexual union and prohibit same-sex couples from adopting children.

For the measure to become law, it requires the approval of two consecutive legislative sessions. An initial approval was given in April 2015.

On Wednesday, the Supreme Court criticized how the measure was approved, saying that it was rushed through the Legislative Assembly in the waning days of the session with no opportunity for the public to weigh in.