'Teen Mom' Star Gary Shirley Keeps The Kid ... and Scores Cash!!

5/23/2016 12:50 AM PDT

'Teen Mom' Star Gary Shirley Keeps The Kid And Scores Cash!!

EXCLUSIVE

"Teen Mom" OG star Gary Shirley is set for a great Father's Day ... he's keeping primary physical custody of his daughter with Amber Portwood ... and mama's paying child support. 

Gary and Amber have been locked in a custody war for years over 7-year-old Leah.

Amber lost primary custody in 2011 and then went to prison for drug possession the following year. Amber says late last year they agreed to joint legal custody with primary physical custody going to Gary. They have since been fighting over child support.

The parents were in an Indiana court last week and struck a settlement. Gary will retain primary physical custody. As for child support ... Amber has to fork over $1,200 per month.

They both say they can put their beef behind them and properly co-parent their kid.