Ben Fox Rubin/CNET

Amazon has donated $1 million to the Wikimedia Endowment, a fund supporting Wikipedia, the e-commerce giant said Tuesday.

The gift was intended to support Wikipedia and its nonprofit parent Wikimedia, which Amazon relies on for answers on its Alexa voice assistant. It was Amazon's first ever to the free online information and education organization.

"We are grateful for Amazon's support, and hope this marks the beginning of a long-term partnership to supporting Wikipedia's future," Wikipedia founder Jimmy Wales said in a statement.

Amazon said consumers can also donate to Wikimedia via Alexa Donations, a feature the company launched in April to let people use their Echo speakers to give money to nonprofits.

Amazon's donation comes as the company and its founder, CEO Jeff Bezos, have both been working to do more in philanthropy. At the same time, Amazon's surging stock price has made Amazon one of the most valuable companies in the US, at over $950 billion, and made Bezos the world's richest person.

After little charitable work in past years, Amazon has stepped up with support for Mary's Place, providing the Seattle nonprofit with a permanent homeless shelter in one of Amazon's buildings. In 2013, it also started AmazonSmile, which donates a portion of retail sales to charity.

Bezos, who hasn't been a major player in giving, earlier this month announced a new $2 billion fund to help nonprofits focused on homelessness and create a new network of preschools in low-income communities.

The company and Bezos have still faced considerable criticism, with some saying Bezos' latest giving is small when compared with his $159 billion fortune. US Sen. Bernie Sanders and others have also criticized Amazon over how it pays and treats its warehouse workers.

Taking It to Extremes: Mix insane situations -- erupting volcanoes, nuclear meltdowns, 30-foot waves -- with everyday tech. Here's what happens.

Fight the Power: Take a look at who's transforming the way we think about energy.