Serena Williams said she was struggling with a back problem. Photo: EPA

Serena Williams’ long winning streak came to an end in a stunning fourth-round defeat to Ana Ivanovic at the Australian Open on Sunday.

Ivanovic hadn’t won a set in her four previous matches against Williams, who had been a hot favourite to win a sixth Australian Open crown for her 18th grand slam title. Williams later said she’d been bothered by a back problem in practice in recent days and considered pulling out of the tournament.

The No. 14-seeded Ivanovic set up the 4-6, 6-3, 6-3 win by attacking the best serve in women’s tennis. She frequently stood well inside the baseline to receive, she took big swipes on her forehand and generally put Williams off her rhythm.

“It’s not easy playing such a champion ... but she is also just a human,” said Ivanovic, who beat Venus Williams in the final of the WTA event at Auckland, New Zealand earlier this month. “I just went out there swinging at the ball.”

Williams hadn’t lost a match since August, one of only four defeats in 2013, and came into the fourth round with 25 straight wins. It was her 70th match at Melbourne Park, a record in the Open era, and she’d already set the mark for most match wins ever at the Australian Open with her third-round victory.

“It wasn’t the best,” Williams said after being told her coach had released news of her back problem.

“Again, I don’t want to blame anything. I feel like Ana deserves all the credit,” Williams added. “I feel she played unbelievable today. I think she went for her shots. It’s not like I gave her the match.”

Williams has been almost perfect after winning the first set in Australian Open matches, losing only once in 52 previous matches after winning the opening set. That single previous defeat was against fellow American Sloane Stephens in the quarterfinals last year.

Ivanovic got on top early in the second set with some powerful forehand winners and never really let Williams back into the contest.

The 2008 French Open champion had 33 winners, including 20 on her forehand side.

Williams hit 22 winners but made 31 unforced errors, with most coming uncharacteristically on her backhand side.

“I made a tremendous amount of errors, shots ... I haven’t missed since the ’80s,” Williams said.

Ivanovic advanced to a quarterfinal against the winner of Sunday’s later match between Australian wild-card entry Casey Dellacqua and No. 30-seeded Eugenie Bouchard of Canada.