Now that Elon Musk has decided that he doesn’t want to buy Twitter Inc. after all, he can’t just walk away from the $44 billion contract. The billionaire co-founder of Tesla will need to make his case before a judge in Delaware that Twitter failed to uphold its side of a merger deal reached in April. If history is a guide, his job won’t be easy.

Twitter Chairman Bret Taylor vowed Friday that the social media platform will fight in the Delaware Court of Chancery to compel Musk to follow through on his agreement, and the company has lawyered up in a race to sue. A filing could come as soon as early this week, people familiar with the matter said.

If the judge rules against Musk, he could be forced to pay Twitter shareholders $54.20 a share, as he said he would in the accord announced April 25. A ruling in his favor would let Musk walk, though he’d probably have to pay a break-up fee, initially set at $1 billion. There’s also the prospect that both sides reach a settlement whereby Musk still makes the acquisition, potentially at a lower price.