* Milan to have two chief executives
* Galliani to work with Barbara Berlusconi (Adds detail)
By Terry Daley
ROME, Nov 30 (Reuters) - Adriano Galliani has agreed to stay at AC Milan with his previous role of chief executive to be shared with club president Silvio Berlusconi's daughter Barbara.
Galliani had announced angrily on Friday that he was resigning after nearly 28 years in the job but, after meetings with the president, a solution was worked out and the departure averted.
"Today we reached a full agreement on how to organise the club, with two CEOs: one is Adriano Galliani, who will deal with the sporting area, while Barbara Berlusconi will manage the other areas of the club's activities," Berlusconi said in a statement to news agencies on Saturday.
"I also promise to be closer to the club and the team from now on," added the president.
Galliani had cited his treatment by Berlusconi's daughter, a club director who recently called for a new philosophy at the club, as a reason for his resignation.
Former champions Milan are 13th in Serie A after a poor start to the season and have taken only 14 points from 13 games.
The bad results have enraged fans, who have blamed directors rather than coach Massimiliano Allegri. Some 300 supporters blocked the players' exit from the San Siro stadium after a 1-1 draw with Genoa last weekend.
Galliani and Berlusconi met over dinner late on Friday at the former prime minister's villa in Arcore, the site of the alleged "bunga bunga" parties which have landed him in political hot water, Italian media said.
Berlusconi, 77, was convicted in June of paying for sex with a minor and was this week expelled from parliament over a tax fraud conviction.
"Milan can go forward in a calm manner. Adriano Galliani is more relieved now after yesterday's dinner at Arcore, everyone is staying in their positions and Milan proceed in unity," Berlusconi said earlier.
The media mogul was supposed to visit the club's Milanello training ground on Saturday to speak to the team but said bad weather had grounded his personal helicopter.
"I couldn't come to Milanello only because of bad weather and I'm sorry," said Berlusconi.
Galliani, who was travelling with the team to Sicily for their Serie A match at Catania on Sunday, was appointed by Silvio Berlusconi when he took charge of the club in 1986 and was a key part of their subsequent success.
In his time at Milan they have won 28 trophies, including eight league titles, five Champions Leagues and the World Club Cup.
However his relationship with Barbara has degenerated and a 2-0 home defeat to Fiorentina on Nov. 2 led to reports that she wanted him replaced.
"It's not for me to comment on the words of president Berlusconi," Galliani said on Saturday before setting off for Catania. "For me what he says has for the last 34 years been sacred. His words need no comment." (Editing by Clare Fallon/Alan Baldwin)