BRISBANE, Australia (AP) — Robbie Deans quit as Wallabies coach just two days after a humiliating defeat to the British and Irish Lions, bringing an end to a five-year reign mired in controversies ranging from selection strategies to what one player described as the "toxic" environment in the camp.

Ewen McKenzie, director of coaching at Super Rugby club the Queensland Reds, was expected to be confirmed as Wallabies coach later Tuesday.

Deans told Australian Rugby Union chief executive Bill Pulver on Monday that he wanted to quit, less than 48 hours after Australia was beaten 41-16 by the Lions in the deciding match of their three-test series.

His contract, renewed ahead of the unsuccessful World Cup campaign in 2011, was due to end at the end of the season but speculation had been mounting by the week that he'd either quit or be fired before then.

The New Zealander became the first foreigner appointed as head coach of the Wallabies in 2008. His departure comes only weeks after South Africa's Mickey Arthur, the first foreigner appointed as Cricket Australia's head coach, was fired in the buildup to the Ashes series in England.

In a news conference last week ahead of the series-deciding test in Sydney, Deans said he thrived on the rollercoaster emotions of coaching international rugby and couldn't imagine a day when he didn't have a test match to plan for.

In a statement released by the ARU on Tuesday, Deans thanked fans, players and officials for their support.

"It has been a rewarding five years and I am proud of all that we have achieved," he said.

The 53-year-old Deans, a former All Blacks fullback, was head coach in 74 tests for the Wallabies, more than any previous coach. He led the Wallabies to 43 wins, 29 losses and two draws, for a winning ratio of 58 percent. But he was never able to reproduce the consistency and success he had as coach of the Christchurch-based Super Rugby powerhouse Crusaders.

While the Wallabies had some stirring wins during his tenure, it was some of the losses that counted against him, including shocking home defeats to Samoa and Scotland and a World Cup group stage loss to Ireland.

He guided Australia to the Tri-Nations title in 2011, but the Wallabies then struggled at the World Cup and, after narrowly beating 2007 champion South Africa in the quarterfinals, were outplayed by eventual champion New Zealand in the semifinals.

Pulver said Deans made a significant contribution to Australian rugby.

"Robbie came into the job in 2008, improved our away record almost immediately, delivered a Tri-Nations title in 2011, and has been a significant part of a Lions tour that overshadows any other rugby event in Australia since the 2003 Rugby World Cup," Pulver said.

The ARU scheduled a news conference for Tuesday afternoon in Brisbane, where McKenzie is based with the Reds.

An ex-test prop, McKenzie won 51 caps for Australia and was a key member of the 1991 World Cup-winning squad.

After stints as an assistant coach for the Wallabies and with the New South Wales Waratahs, McKenzie moved to Queensland to take over the embattled Reds. In the space of two seasons, he guided them from the near the bottom of the standings to become 2011 Super Rugby champions. His backers point to McKenzie's ability to alter his strategies to suit his teams as the main asset in his coaching.

McKenzie, 48, announced in March his intention to leave the Reds and pursue a national coaching role, saying at the time: "Anyone who knows me understands I have strong coaching ambitions and, after spending nine years coaching at a Super Rugby level, I'm excited about pursuing a different role either here or overseas."

His appointment could see the return of former test flyhalf Quade Cooper, whose Wallabies career appeared to be over after he complained about the "toxic environment" of the squad under Deans last year.

Cooper was not chosen by Deans for the three-test Lions series, with Deans experimenting with the untried James O'Connor in the pivotal flyhalf position. The move backfired, with O'Connor struggling to consistently direct the Australian backline as first receiver.

Australia's next test is against the All Blacks in Sydney on Aug. 17 in the first match of the Rugby Championship.

Deans' predecessor as Wallabies coach, John Connolly, praised McKenzie's expected appointment.

"I think it's a good thing for Australian rugby," Connolly told Fairfax Media. "It's important to have an Australian coach and Ewen deserves it."