American pharmacy-chain operator Walgreens has named Starbucks' current chief operating officer Rosalind Brewer as its new chief executive.

She will become one of only two Black women to head a Fortune 500 company.

Walgreens said Wednesday that Brewer would officially take over March 15. Until then, Starbucks has announced Brewer's departure.

"I am excited to work alongside the entire [Walgreens Boots Alliance] team as we deliver further innovation and positively impact the lives of millions of people around the world every day," Brewer said in a statement.

Brewer will be taking over from Stefano Pessina, who has been Walgreens's CEO since 2015. Walgreens announced Pessina's departure in July.

Brewer is a director of Amazon and Starbucks. Brewer is set to step down from Starbucks' board once she becomes Walgreens' CEO. Brewer will join Walgreens' board.

Catalyst - a nonprofit group that tracks women in leadership positions - said it was "ecstatic" to see Brewer take the position. The group said there was a need for more women to lead large companies.

"We are accelerating the number of women CEOs, period, in the Fortune 500...as it relates to Black women that have been a place that has been lagging," the group said.

Brewer became the operating chief of Starbucks in 2017. Before that, she was president and CEO of Sam's Club. She was the first woman and first African American to head the Walmart subsidiary. Brewer also previously served as the director of Lockheed Martin and Molson Coors.