Banking giant JPMorgan Chase & Co filed a $162 million lawsuit against Tesla Inc, alleging Elon Musk's electric vehicle company of "flagrantly" violating a contract about stock warrants after Tesla's stock price climbed.

A lawsuit filed in Manhattan federal court claims that Tesla sold warrants to JPMorgan in 2014 that would pay off if the "strike price" of the contracts fell below the price of Tesla's stock at the time of the warrants' expiration in June and July this year.

Tesla did not immediately respond to requests for comment after extended trading sessions, Tuesday. 

JPMorgan, which claimed power to change the strike price, said it significantly decreased it following Musk's Aug. 7, 2018 comment on Twitter that he was considering taking Tesla private at $420 per share with "funding secured," and reverted some of the decreases when the Tesla CEO abandoned the plan 17 days later.

However, by the time the warrants expired, Tesla's stock price had increased by almost tenfold, and JPMorgan claimed that this necessitated Tesla's obligation under its contract to give shares of its stock or cash. Tesla's failure to comply with the bank's demands amounted to default, according to the bank.

The complaint stated that "even though JPMorgan's changes were appropriate and legally required," Tesla had "flagrantly disregarded its unambiguous contractual obligation to pay JPMorgan in full."

In the complaint, Tesla claims that it sold the warrants to prevent potential stock dilution from separate convertible bond issuance and lessen its federal income tax liability.

Following significant corporate transactions involving the electric car maker, JPMorgan asserted that it was contractually obligated to alter the terms of the warrants in question.

Tesla complained in February 2019 that the bank's revisions were "an opportunistic attempt to take advantage of swings in volatility in Tesla's shares." Still, JPMorgan maintained Tesla did not contest the underlying calculations.

Musk and Tesla were both fined $20 million as a result of his tweets, which were investigated by the U.S. Securities and Exchange Commission.

In the 16 months that followed, Tesla stock hit a three-year low of just under $177 per share in June 2019, before surging beyond $420 per share in December of that year. 

Tesla stock has now recovered to more than $420 per share. The SEC later charged Musk with securities fraud. Tesla and Musk agreed to pay a total of $20 million to resolve the lawsuit.