LONDON — A British nurse who was denied a Guinness World Record because she ran the 2019 London Marathon in pants instead of a dress was granted her title this week after a public outcry over what many called outdated and sexist criteria.

The nurse, Jessica Anderson, beat a record set in 2015 — for the fastest woman to run the marathon in a nurse’s uniform — by 32 seconds while wearing a baggy blue scrub: her uniform as an employee of the National Health Service in the East End of London.

Image Jessica Anderson crossed the finish line of the London Marathon in 3 hours 8 minutes 22 seconds. Credit... Eric Tolentino, via Jessica Anderson

“They said it had to be a white or blue dress, pinafore apron and white cap or it wouldn’t count as a record,” Ms. Anderson said on Sunday, adding, “I didn’t want to wear that, so I chose to wear my real uniform.”