(CNN)Maryam Mirzakhani, a Stanford University professor who became the only woman to receive the highest honor in mathematics, died Saturday after a long battle with cancer, the school said.

She was 40.

The Iran native thrived in study of curved surfaces such as doughnut shapes and amoebas — to a degree that other bright minds in the field dared not explore, her colleagues have said.

In 2014, she became the first woman to receive the Fields Medal, the highest honor in mathematics and equivalent in reputation to a Nobel Prize.

The International Mathematical Union established the award in 1936 and has presented it to at least two people every four years since 1950. All 52 recipients before Mirazkhani were men.

“Maryam is gone far too soon, but her impact will live on for the thousands of women she inspired to pursue math and science,” Stanford University President Marc Tessier-Lavigne said.

### Like finding a way out of a jungle

When she won in 2014, the IMU called Mirzakhani’s accomplishments in complex geometric forms such as Riemann surfaces and moduli spaces “stunning.”

“Because of its complexities and inhomogeneity, moduli space has often seemed impossible to work on directly,” the IMU said. “But not to Mirzakhani.”

She was happy to take it on.

“It is like being lost in a jungle and trying to use all the knowledge that you can gather to come up with some new tricks, and with some luck you might find a way out,” she said once.

Her work could help advance understanding in physics, quantum mechanics and areas outside math, Stanford said in an online news article about her death.

She said the 2014 award was a great honor.

“I will be happy if it encourages young female scientists and mathematicians,” Mirzakhani said at the time.

### From Iran to California

Mirzakhani was drawn to mathematics while in high school in Iran’s capital, Tehran, where she grew up.

As a teenager, she gained international attention when she won gold medals in two International Mathematical Olympiads, achieving a perfect score in one.

Mirzakhani got her undergraduate degree at Sharif University of Technology, then moved to the United States, where she went to work on her doctorate at Harvard University.

She was an assistant professor at Princeton University before moving to Stanford.

Iranian President Hassan Rouhani saluted Mirzakhani in a message in Farsi, posted to Twitter.

“Maryam Mirzakhani was a creative scientist and a gracious human being who lifted Iran’s name in the global scientific community,” Rouhani’s account reads. “May she Rest In Peace.”

Read more: http://www.cnn.com/2017/07/15/us/mirzakhani-obituary-first-woman-win-math-prize/index.html