Uber's new policy would prohibit passengers and drivers from having guns inside its vehicles.

The company's rule states that violators risk losing access to Uber services.

A spokesperson for the company said in a statement that the ban was adopted "after assessing existing policies and carefully reviewing recent feedback from both riders and driver-partners."

The company changed its rules on June 10 following two recent times when Uber drivers fired guns.

Uber was criticized last year for how it screens drivers.

The company, which is said to be valued at as much as $50 billion, promised to strengthen its background checks and institute more safety measures following reports of assault, rape and kidnapping by Uber drivers.