(Reuters) - Mike Lynch, the tech founder once hailed as Britain's answer to Steve Jobs, will take the stand in his own defense on Thursday in San Francisco federal court as his trial on charges of bilking Hewlett-Packard in an $11 billion deal to acquire his company nears its end.

The testimony is a pivotal moment in the 13-year legal saga that started with HP's disastrous purchase of Autonomy, the software company Lynch cofounded, in 2011.

The deal was a huge loss for the Silicon Valley company. HP wrote down Autonomy's value by $8.8 billion in 2012, saying it had uncovered serious accounting improprieties. 

Lynch and former Autonomy finance executive Stephen Chamberlain face charges of fraud and conspiracy for allegedly scheming to inflate the company's revenue starting in 2009, in part to entice a buyer.

Prosecutors say the pair padded Autonomy's finances through back-dated agreements and "round-trip" deals that fronted cash to customers through fake contracts.

At the trial that began in mid-March, jurors have heard from more than 30 government witnesses including Leo Apotheker, the former HP chief executive who was fired weeks after the Autonomy deal was announced.

Lynch's legal team has argued at trial that HP was so eager to bag Autonomy and shut out potential competitors that it rushed through due diligence before the sale.

Lynch's attorney said in opening arguments that the Cambridge-educated entrepreneur was focused on tech issues and left money matters to Sushovan Hussain, Autonomy's then-chief financial officer.

Hussain was separately convicted in 2018 at a trial in the same court. He was released from U.S. prison in January after serving a five-year sentence.

One of the UK's biggest tech deals at the time, the Autonomy buy was meant to fuel HP's software business. Instead, it spawned a series of bitter and expensive legal battles. HP largely won a civil lawsuit against Lynch and Hussain in London in 2022, though damages have not yet been decided. The company is seeking $4 billion.

At that trial, Lynch was on the stand for 20 days. 

Lynch said HP did not know what it was doing with Autonomy, and was out of its depth in understanding his technology.

(Reporting by Jody Godoy in New York and Abhirup Roy in San Francisco; Editing by Matthew Lewis)

By Abhirup Roy and Jody Godoy