NEW YORK — Oscar and Grammy winner Common surprised a group of New York students by donating $10,000 to help their teachers buy supplies like calculators and science kits.

The rapper-actor partnered with the nonprofit AdoptAClassroom.org and Burlington Stores to give Renaissance School of the Arts in Harlem the funds on Thursday. Students cheered loudly after they learned the musician was at their school.

“I always felt like one of my biggest duties and purposes is to hit the youth with something that’s inspiring, hit young people with something that can motivate them to be in their greatness,” Common, 45, said in an interview with The Associated Press after the event.

Common encouraged the students to keep their grades up and to persevere — in school and in life. He spoke about pushing through when setbacks occur, telling the students about not getting some acting roles he wanted and competing with other musicians to create a song for the film “Selma.” His song from the movie about the Rev. Martin Luther King Jr. — “Glory” with John Legend — went on to win the Academy Award for best original song in 2015.

Common, born Lonnie Rashid Lynn Jr., said he started writing poetry and songs at age 12.

“I was always into writing but I didn’t know how good I was until my mother told me that and one of my ex-girlfriends in high school, she was like, ‘You always used to write good love letters,'” he said, smiling.

Two students on Thursday showcased their talents by performing original poems they wrote. Jadon-Li M. Antoine, an aspiring musician, actor and dancer, said Common’s visit motivates him to keep aiming for his dreams.

“It gave me a little bit more hope. It gave me that extra push,” the 14-year-old said.

“I thought it was cool because (Common) does music and he’s an actor, and I really look up to him,” said 12-year-old Khalil Green, who wants to be a veterinarian, writer and actor. “He’s one of the hottest in the game.”

Common was on-site with his mother, Dr. Mahalia Hines, an educator and member of the Chicago Board of Education. She said she remembered spending her own money to buy essential materials for her classroom.

“A lot of the materials you needed to teach, we weren’t given the money to do it so you just went out and bought your own. If you had to have notebooks … you bought them because there were many lessons you definitely would have not been able to do without them,” she said.

Burlington has been raising money from its 599 stores to help other schools, asking customers to donate $1 or more. It began on July 9 and goes through Aug. 19.