TEL AVIV — Waving rainbow flags and pushing strollers, tens of thousands of Israelis demonstrated against Prime Minister Benjamin Netanyahu and his right-wing, religious coalition on Sunday after it blocked an effort to extend surrogacy rights to same-sex couples.

“This is the 21st century,” said Itzik Shmuli, a gay lawmaker from the Zionist Union party. “People are not seated at the back of the bus because of the color of their skin, and they will not be deprived of the right to be parents because of their orientation.”

“Netanyahu has sold the most important thing in our society to an extremist minority in his government for extraneous political interests: the value of equality,” he said.

In a law enacted this week, the government extended surrogacy rights to single women, but rejected an amendment that would have included same-sex couples and allowed gay men to father children through surrogates.