The Food and Drug Administration approved a birth control app as a form of contraception for the first time on Friday.

The Swedish app, Natural Cycles, uses body temperature to determine when a woman is most fertile so she can decide whether to use protection, or to abstain from sex.

Using a basal body thermometer, a woman is expected to take her temperature orally upon waking and enter the data into the app. Throughout the month, Natural Cycles will give a woman a “green light”  if her temperature reading indicates a less fertile day and a “red light” if it’s one of her most fertile days, when she should use an additional contraceptive. According to Natural Cycles, most women have 10 red days a month.

“Consumers are increasingly using digital health technologies to inform their everyday health decisions, and this new app can provide an effective method of contraception if it’s used carefully and correctly,” Dr. Terri Cornelison, assistant director for the health of women in the FDA’s Center for Devices and Radiological Health said in a statement.

“But women should know that no form of contraception works perfectly, so an unplanned pregnancy could still result from correct usage of this device,” she added.

The FDA reports that Natural Cycles has a “perfect use” failure rate of 1.8 percent in clinical studies, meaning that 1.8 in 100 women who use the app for a year will become pregnant, either because the app misreported a day as not fertile or because their form of protection failed on a fertile day. Natural Cycles said on their site that 7 out of 100 women will become pregnant over the course of a year due to incorrectly using the app, such as going without contraception on a red day.

In comparison, the pill is 9 percent effective, a male condom is 18 percent effective and an IUD is the most effective, at 0.2 percent, according to the Centers for Disease Control.

However, the app, which was cleared for use in Europe in Feb. 2017, is currently under investigation in Sweden by the Medical Products Agency after 37 of the 668 women who underwent abortions at a Stockholm hospital from Sept. to Dec. 2017 had been using Natural Cycles as contraception. The U.K.’s Advertising Standards Authority launched their own investigation into the app in July over the company’s marketing claims.

We contacted Natural Cycles for further comment. The company celebrated the FDA announcement on their Twitter page on Friday.

“We are delighted that the US Food and Drug Administration (FDA) has cleared Natural Cycles as the first digital method of birth control in the US,” the tweet read.