KUALA LUMPUR, April 6 — Being homeless did not stop a woman in the United States from buying a bicycle for a three-year-old to replace the one that got stolen.

The woman, who had since been nicknamed Bike Lady, was alerted of the matter after the Rockland Maine Police Department posted about it on their Facebook page.

Later that day, the woman turned up at the station with a new Spider-Man-themed bicycle, a matching Spider-Man helmet and bicycle lock informing the officers that she wished to donate it to the boy, Fox 13 News reported.

The boy had left his bicycle, which had Spider-Man-themed graphics, outside a store in Rockland, Maine on March 26 to go shopping with his mother and it went missing when they came out.

Police had on March 30 shared the matter in the hopes of nabbing the suspect, who was caught on video carrying the bicycle while riding another bicycle away from the scene.

The woman, who wished to remain anonymous, turned up at the station later that day with the gifts.

While the woman did not want anything in return for the gifts, she did share with police her own struggles.

She told police that prior to buying the gifts, she had to make the difficult decision between paying for her car installment or her rent.

As she did not wish to default on her car loan, she was forced out of her home instead.

"Her own struggles did not deter the woman, however, and she selflessly purchased a new bike, helmet and lock at a local Wal-Mart and made the drive to Rockland," police said.

Police later notified Mid-Coast Recovery Coalition, a local non-profit organisation, which set up a fundraiser to help the woman.

"We thought it was important to share this heartwarming outcome with everyone and we are so lucky to live in such a wonderful community and state!" the department added.