Maryam Mirzakhani, Iranian-born mathematician and the first woman to receive the prestigious Fields Medal for mathematics, has died in the U.S.

The 40-year-old had breast cancer, which had spread to her bones, BBC reported.

The Fields Medal was established in 1936, and Mirzakhani became both the first woman and first Iranian to receive the award for her work on complex geometry and dynamical systems in 2014. The distinguished prize, often nicknamed as the "Nobel Prize for Mathematics," is only awarded every four years to between two and four mathematicians under 40.

"A light was turned off today. It breaks my heart... gone far too soon," her friend, NASA scientist Firouz Naderi, posted on Instagram.

Mirzakhani was born in Tehran and lived there until she began her doctorate work at Harvard University, later taking a professorship at Stanford University.

She had dreamed of becoming a writer when she was young, she said, but instead pursued her enthusiasm for solving mathematical problems. "It is fun - it's like solving a puzzle or connecting the dots in a detective case. I felt that this was something I could do, and I wanted to pursue this path," she said after receiving the Fields Medal.

"This is a great honor," she was quoted as saying in 2014. "I will be happy if it encourages young female scientists and mathematicians."