Williams was off-contract with his deal at Rotherham United finishing.

The winger is returning to Pompey, the club that first brought him to England as a teenager in 2010.

Williams made 81 appearances for Rotherham over the past two years after joining from Barnsley.

"I think everything's here, the support's here," he told the club website.

"With the new chairman and owner and stuff like that there's no reason why we can't go and do more. I think, first and foremost, we've got to try and get back into the Championship. I think it's a bit of a jewel down here.

"You can see the weather down here. I feel like I'm on holiday. I'm sweating. So it's a great place to live, the football's amazing, the fans are amazing. It's an awesome club, it's got history so it's perfect. It's just waiting there to be a diamond in the rough really."

The 25-year-old made his international debut for Australia this month in a friendly against South Korea.

Portsmouth boss Kenny Jackett said: "We’re pleased that Ryan's chosen Pompey, who were his first club many years ago.

"He’s an attacking winger who can play on either side and ensures we have good competition in that area.Ryan’s just made his debut for Australia, but has been in England for many years now and established himself.

"He speaks very fondly of this club and has continued to follow them. He’s delighted to come back and is doing so in his prime."