Thousands of mourners gathered to pay their respects at the funeral of Italian cyclist Marco Pantani.
The funeral was held in Pantani's home town of Cesenatico in the same church where he was baptised.
A note by Pantani, who fell from grace in 1999 amid doping allegations, was read out in which he expressed anger at how he was treated by sports bodies.
The last man to win the Tour de France and Giro D'Italia in the same year, he was found dead in a hotel on Saturday.
The exact cause of the 34-year-old's death in the resort of Rimini is not yet known, but an autopsy revealed he suffered a heart attack.
In the church, Pantani's coffin lay covered in yellow and white roses, with a picture of the cyclist and one of his cycling jerseys placed on the front.
Only friends and family were permitted to be present at the funeral ceremony, but authorities erected loudspeakers so the thousands of mourners in the streets outside could hear the service.
Pantani was one of Italy's most popular sportsmen but fell from grace a year after his 1998 double, when a blood test led to the charge that he had taken banned performance-enhancing substances.
He was ejected from the Giro in 1999 and, although the court eventually threw out that case against him, more doping accusations followed.
During the service Pantani's friend and former manager Manuela Ronchi read out a note in which the cyclist expressed his anger, frustration and sadness at the way he was treated by sporting and judicial authorities.
The note was found scribbled on nine pages of Pantani's passport.
"The world understands that all my colleagues have been humiliated in their hotel rooms with hidden TV cameras... that tried to ruin many families," the note read.
"After that how can you not hurt yourself? I don't know why I stopped myself in these moments of anger. If I made mistakes I'd like to know that there is proof but when my sporting life and above all my private life was violated I lost a lot," it said.
"For four years I was in every court. I lost my desire to be like every other sportsman. But cycling paid and many youngsters have lost faith in justice."
Reuters news agency said it was not clear when or where the note was written but part of it appeared to have been written during a recent trip to Cuba.
Many of those who came to pay their respects reportedly brought yellow, pink and white wreaths - the colours of Pantani's cycling jerseys.
Parish officials in Cesenatico told French news agency AFP that more than 4,000 people signed a book of condolences.
Many had also filed past Pantani's coffin on Tuesday evening before the ceremony.
The mayor of the town - which is about 20km from Rimini on Italy's Adriatic coast - declared Wednesday a day of mourning.
Shops in the village closed for the day - many plastered with posters proclaiming "forever with our champion".
And Giro organisers have announced that a mountain stage will be held in Pantani's name in each future edition of the race.
Pantani's mother Tonina has blamed anti-doping investigators and the press for driving her son to his death.
She shouted at reporters and camera crews who had gathered in Cesenatico on Tuesday : "Go away! Go away! You don't have any right, you don't have any respect.
"You killed him, leave us alone in our grief."
According to Italian Rai Radio, police are searching for a drug dealer believed to have sold cocaine to Pantani.
The Rimini Public Prosecutor's Office is trying to track down a smartly dressed man who, according to several eyewitnesses, paid a visit to the cyclist.
Pathologists say the exact cause of Pantani's death may take several weeks to establish.