Is one of these correct?<br/>He did it by obligation/out of obligation.<br/><br/>Thank you