Peter Gallagher will guest star on Season 3 of FXX’s “Man Seeking Woman,” Variety has learned exclusively.

He will play Joel Greenberg, Josh (Jay Baruchel) and Liz’s (Britt Lower) estranged father — a slick, dashing lawyer with a magical secret.

The date of Gallagher’s episode has not been set yet, but the third season of “Man Seeking Woman” will debut in early 2017.

“Man Seeking Woman” follows Baruchel’s character as he soldiers through the life-and-death stakes of dating. Eric Andre stars as his best friend and Lower plays his intimidating older sister. Katie Findlay (“How To Get Away With Murder”) will also star in the upcoming season as Josh’s new love interest.

Simon Rich created “Man Seeking Woman,” which is based on his book of short stories, “The Last Girlfriend on Earth.” He serves as showrunner and exec producer, along with Jonathan Krisel, Andrew Singer and Lorne Michaels who producers through his Broadway Video banner. The series hails from FX productions.

Gallagher, who starred on “The O.C.,” has recently recurred on Fox’s “New Girl,” NBC’s “Law & Order: SVU” and HBO’s “Togetherness.” He also has a lead role in NBC’s “Cruel Intentions” reboot, which still sits in the pilot phase, as it awaits a decision on whether it will go to series. Up next, he’ll be seen in the indie comedy “Literally Right Before Aaro,” starring alongside Cobie Smulders and Lea Thompson.

Gallagher is repped by Gersh and John Carrabino Management.