Rangers assistant manager Ally McCoist and Scotland boss George Burley both admitted the loss of their captain to an ankle injury was a major setback.

The midfielder will miss his club's bid to qualify for the Champions League group stages and the start of Scotland's World Cup qualifying campaign.

Ferguson played with an ankle injury through much of last season and the club believed a summer of rest would provide a cure.

But Rangers say a problem was discovered early this week and tests resulted in the 30-year-old being booked in for surgery at the beginning of next week.

"It's a massive blow. He is going to be out for the best part of three to four months. It's very disappointing and no-one is more disappointed than Barry," McCoist said.

"Sadly, these things happen in football and you just have to get on with it. When Barry Ferguson gets injured then it opens the door for other people.

"We won't rush him back but we obviously wish him well in his recovery.

"The one saving grace is that this did not happen the day before the start of the season. We have some time to try to cope with it, and we simply have to cope with it."

Rangers will now look at options for midfield cover, with talks continuing with Fulham over a permanent move for Steven Davis.

Fulham are said to want £4million for the Northern Ireland midfielder, who impressed on loan at Ibrox from January.

"We will need to see what the finances are like and we will all sit down and discuss the situation," McCoist told www.rangersfc.co.uk.

"We know it's vital that we hit the ground running and make a good start to the season, and losing Barry is a problem.

"He is an integral part of the team but we have some time to shape a team without him."

As well as missing the Champions League qualifiers, which start for Rangers on July 30 against FBK Kaunas or Andorran side Santa Coloma, Ferguson is set to miss out on almost half of Scotland's World Cup qualifiers.

He will definitely sit out the trips to Macedonia and Iceland in September and is a major doubt for the visit of Norway on October 11.

National boss Burley said: "Barry has been a very important player for Scotland for a number of years and to lose our captain at the start of the qualifying campaign is a huge blow to everybody.

"We'll be keeping in touch with Rangers and Barry over the next few months and our hope is that he gets back playing as soon as possible."

Ferguson has been hampered by ankle problems for much of the past three seasons.

He underwent surgery to repair ligaments in his right ankle in April 2006 after playing through the season with the help of injections to counteract pain caused by wear and tear.

The former Blackburn player continued to play through ankle pain last season as he wanted to help his team's quadruple challenge. He saw a specialist in March when he was given treatment that allowed him to play through the pain barrier.

Ferguson played a total of 66 games for club and country last term, and was an ever-present in his side's Clydesdale Bank Premier League campaign.

Rangers believed he needed rest rather than surgery this summer, but Ferguson did not get past the early stages of the pre-season programme.

He will remain in Scotland while his team-mates travel to Holland on Saturday for a training camp, which will be complemented by three games in Germany.

Another player who will stay behind is left-back Steven Smith, who also has an ankle injury.

The 22-year-old suffered a minor knock as he bids to re-establish himself in the first team after pelvic and groin problems restricted him to two appearances in 18 months.

McCoist said: "I'm gutted for Stevie but the good news is that the injury is not serious.

"He took a bang on the ankle in training and it means he will miss the trip to Holland and Germany.

"However, he has done the vast majority of the pre-season work, which will stand him in good stead, and the physios think he will only be out for a week or so."