A bathroom emergency can quickly turn into an embarrassing experience.

But now there's an app with an "emergency" button to help you find the nearest bathroom when medicine just won't do the trick.

Lion Corp., maker of the diarrhea medicine Stoppa, says the @Toilet app will find the closest bathroom within walking distance once the emergency button is pressed.

The app provides information on the locations of bathrooms at restaurants, cafes and convenience stores across Japan, including at train stations in Tokyo, Nagoya, Osaka, Fukuoka and Sapporo.

Some 330,000 people have downloaded the app so far, said Lion spokeswoman Shoko Kageyama.

The maker of toiletries and detergents developed the app in 2010 to spare people from having "diarrhea accidents." This proved helpful after the March 2011 earthquake and tsunami, Kageyama said. Downloads surged after the disasters as people in the affected areas had trouble finding bathrooms.

The location data is updated by the users, with new information displayed in red to show whether a toilet in the database was actually usable.

Unfortunately for visitors, the app is currently available only in Japanese.