ISLAMABAD, Feb 8 (Reuters) - Pakistan temporarily shut some of its land borders and suspended mobile phone services on Thursday as it beefed up security for voters in a general election that has been preceded by a surge in militant violence.

The government's decision to deploy tens of thousands of troops at polling stations and across the country comes after two blasts near election offices, for which Islamic State later claimed responsibility, killed 26 people in the southwestern province of Balochistan on Wednesday.

It also follows a call by jailed former Prime Minister Imran Khan to his supporters to wait outside polling booths after voting until results are announced. Last year, Khan's supporters ransacked several government buildings and clashed with troops as they tried to prevent his arrest.

"As a result of the recent incidents of terrorism in the country precious lives have been lost, security measures are essential to maintain the law and order situation and deal with possible threats," the interior ministry said in a message on X.

The borders with Iran and Afghanistan were also shut.

Despite the heavy security, one person was killed when gunmen opened fire on a patrol vehicle in the northwestern area of Tank, a source in the intelligence services said.

There was no immediate confirmation from the security forces.

Unofficial first results in the election are expected a few hours after voting closes at 5 p.m. (1200 GMT) and a clearer picture is likely to emerge early on Friday.

The main contests are expected to be between candidates backed by Khan, whose Pakistan Tehreek-e-Insaf (PTI) party won the last national election, and the Pakistan Muslim League (PML-N) of three-time premier Nawaz Sharif, who is considered the front-runner.

Bilawal Bhutto Zardari, the 35-year-old son of former premier Benazir Bhutto, has also run an aggressive campaign in an outside bid for the top office.

In spite of the bitter winter cold, long queues began forming at polling stations hours before voting was due to start. "The country is at stake, why should I come late?" said 86-year-old Mumtaz, a housewife a decade older than Pakistan itself as she queued up in Islamabad.

Analysts say there may be no clear winner but the powerful generals could play a role. The military has dominated the nuclear-armed country either directly or indirectly in its 76 years of independence but for several years it has maintained it does not interfere in politics.

"The deciding factor is which side the powerful military and its security agencies are on," said Abbas Nasir, a columnist. "Only a huge turnout in favour of PTI can change its fortunes."

SWITCHED PLACES
Khan believes the military is behind a crackdown to hound his party out of existence, while analysts and opponents say Sharif is being backed by the generals.

The two former prime ministers have switched places since the last election in 2018: Khan was believed to be backed by the military then and Sharif was in jail on corruption charges.

"Historically, engineered electoral exercises have not produced stability," Nasir said, adding, "Economic challenges are so serious, grave, and the solutions so very painful that I am unsure how anyone who comes to power will steady the ship."

If the election does not result in a clear majority for anyone, as analysts are predicting, tackling multiple challenges will be tricky - foremost being seeking a new bailout programme from International Monetary Fund (IMF) after the current one expires in March.

Smaller political parties could play a crucial role in the formation of a government that will need 169 seats in the 336-member National Assembly. Voters directly elect 266 members while there are 70 reserved seats - 60 for women and 10 for non-Muslims - allotted according to the number of seats won by each party.

Independents, many of whom are being backed by Khan, are free to join any party if they win, which could swing fortunes after the vote. Khan has said his candidates will not back Sharif or Bhutto Zardari.

Photo from Reuters