12:22 PM PST -- The Marin County Sheriff's Office tells TMZ shortly before an ambulance was called Afeni expressed she had physical pain. She was with two other people who tried CPR after she fell unresponsive until paramedics arrived.

Tupac's mother, Afeni Shakur, died late Monday night ... possibly from a heart attack.

The Marin County Sheriff's Department says it responded to Afeni's Sausalito, CA home Monday around 9:43 PM for a report of a cardiac arrest. She was transported to a hospital ... where she was pronounced dead at 10:28 PM.

Afeni was a philanthropist, founding and running the Tupac Amaru Shakur Foundation after her son's death. She was also a Black Panther ... and defended herself in court when she was accused of multiple bombings in 1970.

As keeper of all things Tupac, Afeni greenlit the biopic, "All Eyez on Me" ... which just recently wrapped filming.

As TMZ first reported ... she was in the middle of an ugly divorce battle -- her estranged husband is demanding $10k per month ... for life.

The Marin County Sheriff says the coroner will investigate to determine the exact cause of Afeni's death.