PARKLAND, Fla. — The woman left in charge of the accused Florida school shooter and his brother after their mom died last year filed court papers the day after the massacre seeking to be put in charge of the dead woman’s will — then had the alleged shooter’s brother involuntarily committed, a source close to the family revealed to The Post.

Shooter Nikolas Cruz, 19, and brother Zachary Cruz, 17, were put in the care of Rocxanne Deschamps after their mom, Lynda Cruz, died from pneumonia on Nov. 1, but Deschamps kicked Nikolas out of her Lantana, Fla., trailer after a standoff over Cruz’s gun collection.

She even took $2,900 from the teen before giving him the boot, a source close to Deschamps told The Post.

Police say Nikolas admitted that he shot up his former high school Feb. 14, killing 17 and injuring 15 in the worst school shooting since the 2012 Sandy Hook massacre.

The following day, Deschamps filed a petition to administer Lynda’s estate, court records obtained by The Post show.

If the petition is granted, she would be responsible for settling Lynda’s debts and doling out the kids’ inheritance. Lynda did not leave a will, and the petition filed does not indicate what her estate is worth, records show.

A family who took Nikolas in said he stood to inherit $800,000 on his 22nd birthday following his mom’s death.

Cruz told them he believed Deschamps was trying to steal his inheritance.

If Deschamps’ petition is granted, she could charge the estate a fee for settling it for the kids, though that fee would be subject to a judge’s review, according to Florida probate lawyer Robert Wolf, who is not involved in the case.

Deschamps filed the petition on the grounds she is “caring for a 50 percent minor beneficiary” — Zachary — according to court papers.

But the source said Deschamps was the one who had Zachary involuntarily committed on Friday. The state cannot hold minors for observation more than 12 hours unless there is a medical reason. It is unclear if he has been released.

Deschamps had six months from Lynda’s Nov. 1 death to file the petition, and her attorney Audra Simovitz called the decision to file the day after the slaughter “appropriate.”

Deschamps has declined to comment.

Cruz could still get his share if convicted, though “anything that boy inherits — he’s gonna be sued and it’s gonna be taken away,” Wolf said.