* President Aliyev set to win third five-year term
* Opposition accuses Aliyev of voting irregularities
* Groups say right violations on the rise
* West eyeing strategic interests, energy supplies (Adds quotes, details on voting, accusations of violations)
By Margarita Antidze and Thomas Grove
BAKU, Oct 9 (Reuters) - Azerbaijan's President Ilham Aliyev appeared on course to extend his rule in the oil-exporting former Soviet republic for a third straight term in an election on Wednesday that his main opponent alleged was marred by voting violations.
Azerbaijan, nestled between Iran and Russia, has enjoyed an economic boom fuelled by oil and gas in the decade since Aliyev succeeded his father, raising living standards and boosting the predominantly Muslim country's clout to court Western powers.
But Aliyev, 51, has faced criticism at home and abroad over the government's treatment of its critics, as protests are quickly quashed and one rights group said a pre-election crackdown had doubled the number of political prisoners.
Azerbaijan's divided opposition has united for the first time in a presidential poll behind a single candidate - Jamil Hasanly, a 61-year-old historian.
But Aliyev's control over most levers of power and media outlets makes his victory a foregone conclusion for many in the Caucasus nation of 9 million. Opinion polls before the election showed Aliyev at about 90 percent.
But few expect sustained protests after the vote, in which Aliyev's victory is a foregone conclusion for many who cite his control over most levers of power and the media.
Polls opened at 8 a.m. (0300 GMT) with election officials and voters singing the national anthem before voters lined up to drop their ballots into white boxes bearing the emblem of the Azeri flag.
Ali Takhmazov, a 66-year-old businessman and former politician, said he voted for Aliyev because he had shown himself to be an effective leader - and hopes he will stay in power for many years to come.
"He has already proved since 2003 that he can lead the country ... and now we're looking at a third term. But let's see a fourth term, a fifth term - I don't see any alternative to him in the next 10-15 years," he said.
Jamil Hasanly, Aliyev's main challenger from a field of nine opposition candidates warned that his supporters were already collecting evidence of election violations. They included ballot stuffing and carousel voting, when voters vote at several polling stations.
"We are collecting evidence of many violations and they give a basis to assume that the elections are not be democratic," he said after casting his ballot. No major electoral violations had been reported by midday, the Central Electoral Commission said.
Aliyev, who opened the path to a third five-year term by backing a 2009 referendum that scrapped presidential term limits, hopes to increase Azerbaijan's regional clout and gain control over a breakaway territory held by ethnic Armenians.
His biggest challenge, however, may be the dissent that has grown over what critics say is endemic corruption, a gaping divide between rich and poor and accusations of human rights abuses that has led business owners and activists to protest.
CHANGE OR STABILITY
The number of demonstrations has increased, sparked in part by young people using social media such as Twitter and Facebook, some taking inspiration from the Arab Spring uprisings.
Rights groups say Azerbaijan's strategic location, its oil reserves, Europe-bound gas pipelines and its role as a transit route for U.S. troops to reach Afghanistan have cushioned it from Western criticism.
"I want changes in our country. This government led by Ilham Aliyev has been ruling Azerbaijan for a long time," said Anchar Gasanly, 19, a student.
Aliyev's foes have united behind Hasanly, a former lawmaker and adviser to the late Abulfaz Elchibey, who was president for less than 15 months in 1992-1993.
Hasanly's coalition has applied to Baku city authorities to hold a rally on Saturday but few expect sustained protests after the vote.
Aliyev has dismissed accusations of human rights abuses and says Azeris enjoy full democratic freedoms, including a vibrant opposition press and free and fair elections.
He has benefited from the reputation of his father, Heydar, who led the country out of the economic chaos of the 1990s and a war over Nagorno-Karabakh, a mountainous territory controlled by ethnic Armenians. About 30,000 people were killed in the war.
Aliyev boasts that per capita GDP increased to $7,850 in 2012 from $850 in 2003, but economic growth has slowed since his first term - it averaged 21 percent per year in 2003-2007 - and the distribution of wealth is uneven.
The average monthly salary is 500 manats ($600), and few Azeris can afford the designer boutiques and five-star hotels that compete for space in bustling downtown Baku with buildings designed by Iraqi-born architect Zaha Hadid.
Still, some see a vote for Aliyev as a vote for stability.
"I voted for the president, because he is the one who secured stability in the republic over the last 10 years," Iskander Kerimov, 33, a state employee, said after casting a ballot at the polling station in central Baku.
Polls close at 7 p.m. (1400 GMT). First official preliminary results are expected within hours of polls closing. (Additional reporting Lada Evgrashina and Afet Mehdiyeva; Writing by Thomas Grove; Editing by Jon Boyle)