RALEIGH, North Carolina (Reuters) - Former Senator and presidential candidate John Edwards must testify before a judge about his relationship with his former mistress, Rielle Hunter, a North Carolina judge ruled on Friday.

The private testimony will come during a deposition set for June 20 as part of a civil suit brought by Hunter against Edwards' former aide, Andrew Young.

Hunter has sued Young and his wife Cheri to force the return of a videotape that allegedly shows Hunter and Edwards having sex. Young says he found the tape while packing boxes in a home near Chapel Hill, North Carolina where Hunter lived with the Youngs for a time.

A February 8 deposition of Edwards was halted when his lawyers told him not to answer numerous questions posed by Young's attorneys. Young's attorneys filed a motion March 2 asking Superior Court Judge Carl Fox to compel Edwards to answer.

On Friday, Fox said he will preside at Edwards' next deposition and settle objections as they arise. The judge also agreed that portions of the transcript not deemed confidential would be made public.

Fox, responding to a motion filed by lawyers representing media organizations, also eased a blanket protective order to allow motions in the case to be made public.

Testimony by Edwards, the 2004 Democratic vice presidential nominee who sought his party's presidential nomination in 2008, could cast light on possible criminal charges regarding payments to Hunter. The U.S. Attorney in Raleigh is investigating whether Edwards violated federal law by using campaign funds to pay Hunter.

Andrew Young wrote a 2010 book, "The Politician," about Edwards' affair with Hunter and how the former North Carolina senator sought to keep the relationship secret as he sought the 2008 Democratic nomination.

Hunter became pregnant with Edwards' child and she gave birth to a daughter in February 2008. Young, at the request of Edwards, first claimed he was the child's father, but Edwards later acknowledged the child was his.

Edwards, an accomplished trial attorney, continues to live in Chapel Hill where he cares for his two youngest children. His wife, Elizabeth, who wrote bestselling books about her life's struggles with cancer and her husband's betrayal, died in December 2010.

Hunter's civil suit against the Youngs is scheduled to go to trial this October.

(Editing by James B. Kelleher and Greg McCune)