Ashley Williams is recovering in hospital after undergoing surgery on a collapsed lung (Ashley Williams, Facebook)

Ashley Williams has undergone surgery on a collapsed lung which he suffered in Wales' goalless draw with Mexico on Tuesday.

The Everton defender was forced off in the 17th minute at the Rose Bowl in Pasadena after challenging Javier Hernandez near the halfway line.

Williams, who was taken to the Ronald Reagan UCLA hospital in Beverley Hills, was also found to have suffered multiple breaks on two ribs.

It was the 33-year-old's first appearance since featuring for Everton against Burnley on March 3.

Williams is consoled by Javier Hernandez after the injury against Mexico

"Crazy couple weeks. Great to be back in a FA Wales shirt and with the lads, however after coming off after 20 mins with multiple breaks on two ribs, I went hospital and found out I had punctured my left lung which led to it collapsing," Williams said on his Facebook page.

"I would like to say a huge thank you to all the staff at Ronald Reagan UCLA hospital in Beverley Hills for looking after me and making sure surgery went as comfortable as possible.

"Look forward to flying home and resting up now before the new season!"