Congratulations Mr. Ratburn!

The affable elementary school educator came out as gay and tied the knot with a man in the Season 22 premiere of PBS Kids show “Arthur” that aired Monday.

The same-sex nuptials followed an investigation by titular aardvark character Arthur and his pals into Ratburn’s home life, during which they initially believed the rat was getting hitched to a bossy woman (voiced by “Glee” star Jane Lynch, who is gay) who turned out to be his sister.

The episode ― titled “Mr. Ratburn & the Special Someone” ― did not actually explicitly acknowledge that the ceremony involved two male characters.

But the storyline for the cartoon, which in 2005 pulled an episode involving lesbian mothers following a backlash, was widely welcomed on Twitter.

The social media platform was flooded with loving messages for the newlyweds: