Socceroos goalkeeper Mat Ryan has joined Spanish outfit Real Sociedad, ending thoughts of re-uniting with Ange Postecoglou at Celtic.

Ryan has signed a two-year deal with an option for a third season with the La Liga club.

The Socceroos stalwart had been linked with Postecoglou, the new manager of Scottish giants Celtic.

But Ryan has opted to return for a second stint in Spain, after spending three years at Valencia from 2015-17.

Real Sociedad signed Ryan from English Premier League side Brighton and Hove Albion, who loaned the shot-stopper to Arsenal midway through last season,

"I will work hard and I can't wait to get started playing for the team," Ryan, capped 61 times for Australia, told Real Sociedad's website.

Ryan spent four years at Brighton but last season lost his starting spot when manager Graham Potter preferred Robert Sanchez in goal.

"Mat has been a great servant to the Albion over the past four years and on behalf of the club I'd like to place on record our gratitude for his efforts," Potter said.

"He's a great guy, top professional and as someone who wants to be playing regularly at senior level he goes to Real Sociedad with our very best wishes."

Ryan, a veteran of two World Cups, recently helped Australia record an eighth consecutive win in Asian qualifying for soccer's showpiece tournament in Qatar next year.