A Brooklyn matrimonial judge sent a sheriff to a husband’s home with an ex parte order to seize his iPhone and computers after lawyers for the wife submitted evidence showing her husband had planted spyware on her iPhone just before filing for divorce.

Justice Jeffrey Sunshine released a 57-page decision Friday describing his reasoning for ordering the seizure, which occurred in May.