The agreement, involving 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 official said.
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 Ltd., handles 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.
Canadian International Trade Minister Peter Van Loan confirmed Friday to the Associated Press that Canadian officials were in talks with the Canada-based maker and Saudi officials in a bid to avert the ban. RIM has declined to comment on the talks.
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.
Critics, however, maintain that Saudi Arabia and other countries are more motivated by the desire to further curb freedom of expression and strengthen already tight controls over the media than by a fear of terrorism.
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.
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 both for political content and for obscenities.
BlackBerry phones are known to be popular both among businesspeople and youth in the kingdom, where local media estimate there are some 750,000 BlackBerry users, who see the phones' relatively secure communication features as a way to avoid attention from the authorities.