It was expected to be a cracker of a contest but it turned out to be one of the most controversial tennis matches in recent times.

Serena Williams' frustrated and angry outbursts became the talking point of her straight-set defeat to 20-year-old Naomi Osaka in the US Open women's singles final on Saturday.

Williams lost an opportunity to equal Margaret Court's all-time record of 24 major titles but Osaka became the first-ever Japanese player to win a Grand Slam. All these were overshadowed by the on-court controversies and the unruly behaviour of the New York crowd during the presentation ceremony.

Osaka, who idolises Williams, was doing a Williams against Williams in the first set of the final which she had taken 6-2. She was serving with power and precision, was hitting winners at will as she was forcing her seasoned opponent into making errors, 13 of them unforced.

Williams gets three code violations in the dramatic final

Serena Williams
Serena Williams called chair umpire Carlos Ramos "a thief" during Saturday's final.Jaime Lawson/Getty Images for USTA

The second set began on level terms with both the players holding their serves but controversy broke out when Williams was handed the first of the three code violations she had received on Saturday.

Chair umpire Carlos Ramos judged a gesture Williams received from coach Patrick Mouratoglou as coaching, which the 23-time Grand Slam champion vehemently denied.

She was heard on the mic telling the umpire: "You owe me an apology. I have never cheated in my life! I have a daughter and I stand for what's right for her.

"I don't cheat to win. I'd rather lose."

Later in the day, Mouratoglou reportedly admitted to the ESPN that he sent out coaching signs but insisted he was not sure if Williams even noticed it during the second set. 

Racket-smashing Williams calls chair umpire "a thief"

Serena Williams
A visibly frustrated Williams smashed her racket during the second set.Chris Trotman/Getty Images for USTA

Williams was visibly frustrated and smashed her racket on the court at 3-2 — a gesture that prompted Ramos to hand her another violation, this time a point penalty. The American hero started the sixth game on 0-15 and ended up losing it.

Williams didn't let it go as she walked up to Ramos and came up with an angry rant. With the crowd backing the local star, it all became chaotic at the Arthur Ashe Stadium.

After calling Ramos a "thief", Serena went on to chastise the chair umpire further, saying: "You are a liar. You will never be on a court of mine as long as you live. When are you going to give me my apology? Say you are sorry,"

Ramos hit back with a game penalty this time, Williams' third violation of the match. The American star refused to continue playing and requested the tournament referee's intervention.

While Ramos' decision wasn't overturned, Serena continued and held her serve to make it 5-4.

Osaka showed nerves of steel and continued remaining oblivious to the boos and the terrible on-court atmosphere to serve out the match and clinch glory.

Williams was quick to rush to the net and congratulate her opponent but maintained her stance against Ramos as she kept demanding an apology from the chair umpire.

Williams shows her class, controls unruly New York crowd

Serena Williams
Class from Serena Williams!Chris Trotman/Getty Images for USTA

Nonetheless, Williams showed her class during the presentation ceremony, which was marred by boos from an irate New York crowd, which had witnessed the local favourite getting thrashed by Osaka.

With both the players looking upset during the ceremony, Williams intervened and comforted Osaka. She also urged the crowd to stop booing further and let the Japanese player enjoy the biggest moment of her career. 

"I know you guys were here rooting and I was rooting too. But let's make this the best moment we can, we will get through it. But let's give everyone the credit where credit is due. Let's not boo anymore and let's be positive," Williams said.

"Congratulations Naomi, no more booing."

It certainly was a surreal evening session at the Flushing Meadows and America's favourite tennis star played both the hero and the villain.