RIYADH, Saudi Arabia – Some Saudis were trying to sell their BlackBerrys ahead of a ban on the smart phone’s messenger service in the kingdom — but with few willing to buy, they’re having to slash prices.

The Saudi telecommunications regulatory agency announced earlier this week the service would be halted Friday. One Saudi newspaper, Okaz, said the halt would begin at the end of the day, at midnight, but it was still operating an hour after that deadline passed.

The kingdom is one of a number of countries expressing concern that the device is a security threat because encrypted information sent on the phones is routed through overseas computers — making it impossible for local governments to monitor. The United Arab Emirates has announced it will ban BlackBerry e-mail, messaging and Web browsing starting in October, and Indonesia and India are also demanding greater control over the data.

Canadian officials were in talks with the BlackBerry’s Canada-based maker, Research in Motion, Ltd., and Saudi officials in a bid to avert the ban, said Canadian International Trade Minister Peter Van Loan.

“We are making progress,” Van Loan said, though he said that didn’t mean a deal was imminent.

A Saudi telecom official said talks were to continue today. One solution being discussed was for RIM to put a server inside the kingdom, the Saudi official said, speaking on condition of anonymity because of the sensitivity of the discussions.

A RIM spokeswoman did not immediately return a message seeking comment.

Analysts say RIM’s expansion into fast-growing emerging markets is threatening to set off a wave of regulatory challenges, as its commitment to keep corporate e-mails secure rubs up against the desires of local law enforcement.

RIM says it does offer help to governments, but says its technology does not allow it, or any third party, to read encrypted e-mails sent by corporate BlackBerry users. The consumer version has a lower level of security.

On Friday, Lebanon said it is also looking into whether BlackBerry use raises security concerns there — in part because of allegations that Israeli spies are trying to infiltrate phone networks in Lebanon. This summer, Lebanese authorities charged two employees at the state-owned Alfa mobile phone company with spying for Israel. A third suspect worked for the landline operator Ogero.

Lebanon’s main concern is “the ability of our security and judicial groups to access the data when it is required by law and when the security situation requires it,” said Imad Hoballah, the acting head of the Telecoms Regulatory Authority..

In Saudi Arabia — which local media say has some 750,000 BlackBerry users — the ban has raised accusations the government is trying to further curb freedom of expression.

“The real reason behind the ban is the freedom granted by BlackBerry messenger to its users to criticize, object and mock,” columnist Adhwan al-Ahmari wrote in the Al-Watan daily. “Do authorities think that all security breaches will end with the ban of BlackBerry messenger?” he asked, pointing out extremist groups have other ways to communicate.

Saudi Arabia’s telecommunications regulator, known as the Communications and Information Technology Commission, announced the imminent ban Tuesday, saying the BlackBerry service “in its present state does not meet regulatory requirements,” according to the state news agency SPA. Saudi security officials fear the service could be used by militant groups. The kingdom has been waging a crackdown for years against al-Qaida-linked extremists.

Saudi Arabia also enforces heavy policing of the Internet, blocking sites both for political content and for obscenities.

At Riyadh’s main mobile phone market, dozens of young men on the street were trying to sell the devices, some in their original packaging, and some running at more than half the normal price.

“Nobody buys it now,” mourned Nour al-Zaman, a store owner in the market. Al-Zaman said his shop had cut prices for a new BlackBerry from around $300 to around $100.