ANDY GEGGAN will leave Dunfermline and return to former club Ayr United.

The popular midfielder will follow team-mate Michael Moffat in signing a two-year deal at Somerset Park when his Pars contract expires at the end of the month.

The move was confirmed by the Honest Men this afternoon and comes after speculation linking Geggan with them this week.

Geggan, 30, joined Dunfermline from Ayr in 2012 under Jim Jefferies and quickly became a key part of the team that challenged at the top of the First Division.

He remained with the club after it plunged into administration in 2013 and were subsequently relegated.

His all-action style made him a fans favourite and was installed as club captain for a spell under Jefferies.

He was a regular under Allan Johnston as Pars coasted to the League One title, and again this season, as he was effectively deployed at full-back in the Championship.

He leaves having made 194 appearances, scoring 33 goals.