SAN FRANCISCO — As federal prosecutors wrap up their case in a rare economic espionage trial, a key witness took the stand to drive home an obstruction of justice charge levied against Oakland entrepreneur Walter Liew.

However, before Jian Liu, a former employee of the defendant, testified, his lawyer, Mary McNamara of Swanson & McNamara, and Liew’s counsel at Keker & Van Nest wrestled over the ground rules for his appearance in an unusual clash between an assertion of attorney-client privilege and a defendant’s rights at trial.