Saudi Arabia and the makers of the BlackBerry smartphone have reached a deal on accessing users’ data that will avert a ban on phone’s messenger service, a Saudi official said today.

The agreement, which would involves placing a BlackBerry server inside Saudi Arabia, would allow the government to monitor users’ messages and allay official fears the service could be used for criminal purposes.

The deal could have wide—ranging implications for several other countries, including India and the United Arab Emirates, which have expressed similar concerns over how BlackBerry maker Research in Motion handles its data.

The Saudi regulatory official, who spoke on condition of anonymity because he was not authorized to discuss the details of the deal with the media, said tests were now under way to determine how to install a BlackBerry server inside the country.

Security threat feared

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.

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.

Further curbs on freedom of expression?

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

Saudi Arabia’s telecommunications regulator, known as the Communications and Information Technology Commission, announced the imminent ban on 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—Qaeda—linked extremists.

Saudi Arabia also enforces heavy policing of the Internet, blocking sites.