Mackay replaced Brendan Rodgers as Watford boss in June 2009
Malky Mackay has been appointed Cardiff City manager after Watford gave him permission to speak to the Welsh club.
The 39-year-old replaces Dave Jones at the Cardiff City Stadium, whose six-year reign
was ended on 30 May
Cardiff will pay Watford compensation for former Scotland defender Mackay estimated to be close to £300,000.
Hornets owner Laurence Bassini said: "I'm disappointed to see Malky leave. I do, however, wish him the very best... as he begins work at his new club."
The Bluebirds had an official approach for former Norwich and Celtic defender Mackay rejected by the Hornets on Wednesday.
But after discussions at board level Watford "reluctantly" allowed Mackay to talk to their Championship rivals Cardiff.
Watford must now start the search for a new manager and Bassini said that they would take their time to find the right man.
"We must now move on," Bassini said. "There can be no more important a task at a football club than a managerial appointment.
"The current Board - Graham Taylor, Stuart Timperley and David Fransen - will add vital experience to the process which lies ahead of us now.
"Whether we reach a decision quickly or whether it takes a short while, I'm aware the onus is upon us to get it right for Watford."
Former Newcastle manager Alan Shearer revealed on Wednesday that he had held "unsuccessful" talks with the south Wales club.
Another ex-Newcastle manager, Chris Hughton, ex-West Brom boss Roberto Di Matteo, St Johnstone's Derek McInnes and ex-Barnsley boss Mark Robins had all been linked with the vacant Cardiff job.
Chief executive Gethin Jenkins and director Alan Whiteley led Cardiff's search, while chairman Dato Chan Tien Ghee arrived from Malaysia to complete the deal for Jones' replacement.
Watford chairman Graham Taylor had previously admitted that "Malky is linked with virtually every job that comes up" and the Hornets were well aware their manager was in the sights of other clubs.
replaced Brendan Rodgers
at Vicarage Road in June 2009 after the current Swansea manager departed to Reading.
In his first managerial job Mackay earned a reputation for producing, on a modest budget, a side playing competitive and attractive football.
He guided the Hornets to 14th in last season's Championship.
With less than two months to go until the start of the new Championship season, Cardiff recognised the need to appoint a new manager as quickly as possible and moved for the man they want, much to Watford's chagrin.
Cardiff's new manager faces a hefty rebuilding process at the club, with
12 players having left
, including last season's top scorer Jay Bothroyd and fellow striker Michael Chopra.