Malia Obama's obsessed fan kept his distance from her, and that's saving his ass from being charged with a crime ... TMZ has learned.
Law enforcement sources tell us cops were considering booking Jair Nilton Cardoso for stalking and harassment, but ultimately decided his failed attempts to get close to the former first daughter didn't rise to the level of a crime.
As we reported ... the 30-year-old man was detained after showing up to Malia's Weinstein Company office with a sign that read, "Will you marry me?". We're told cops say Cardoso never posed a verbal or physical threat because he never got any closer than standing outside the office.
We're told Cardoso was taken to a NYC hospital for psychiatric evaluation.