The privileged daughter of a prominent city doctor, and her boyfriend — a Harvard grad and Occupy Wall Street activist — have been busted for allegedly having a cache of weapons and a bombmaking explosive in their Greenwich Village apartment.

Morgan Gliedman — who is nine-months pregnant — and her baby daddy, Aaron Greene, 31, also had instructions on making bombs, including a stack of papers with a cover sheet titled, “The Terrorist Encyclopedia,’’ sources told The Post yesterday.

People who know Greene say his political views are “extreme,” the sources said.

Cops found the stash in the couple’s West Ninth Street home Saturday when they went there to look for Gliedman, 27, who was wanted for alleged credit-card theft.

A detective discovered a plastic container with seven grams of a white chemical powder called HMTD, which is so powerful, cops evacuated several nearby buildings.

Police also found a flare launcher, which is a commercial replica of a grenade launcher; a modified 12 gauge Mossberg 500 shotgun; ammo; and nine high-capacity rifle magazines, the sources said.

Cops also allegedly uncovered papers about creating homemade booby traps, improvised submachine guns, and various handwritten notebooks containing chemical formulas.

The couple’s arrest Saturday was a sharp turn from their privileged backgrounds.

Gliedman, who grew up on Park Avenue, graduated from Dalton in 2002. Her dad, Dr. Paul Gliedman, is director of radiation oncology at Beth Israel Hospital, Brooklyn Division.

Paul Gliedman — who was included in New York magazine’s list of top doctors in 2011 — received his medical degree from Columbia University.

Morgan’s mother, Susyn Schops Gliedman, is a realtor with Prudential Douglas Elliman.

Greene attended Harvard as an undergraduate and did his graduate work at the university’s Kennedy School of Government.

He has five prior run-ins with the police, with the charges including, assault, and weapons possession, sources said.

Additional reporting by Kirstan Conley and Jeane MacIntosh