NEW YORK (CNNMoney) -- Linsanity rules again.
The MSG Network and Time Warner Cable struck a deal Friday afternoon to end the standoff that had blocked 2.8 million of the cable's operator's New York customers from watching overnight superstar Jeremy Lin play for the New York Knicks.
The MSG Network, the regional sports network owned by the same company that owns the Knicks, has not been shown on Time Warner Cable, a major regional cable operator, since Jan. 1. During that time, the two sides have been negotiating the monthly fee that Time Warner would pay MSG for each subscriber.
But the huge surge in popularity of ex-benchwarmer Jeremy Lin, a Asian-American Harvard graduate, helped the two sides reach an agreement Friday afternoon. Lin is credited with leading the Knicks to seven straight victories since he got a chance to play.
Dubbed "Linsanity," the Lin story has become the talk of the the sports world, and has sent ratings soaring for the MSG network on the outlets that carry it. MSG says ratings for the six games Lin started more than doubled compared to the previous 20 games.
The deal came in time for Time Warner customers to watch the Friday night Knicks game against the New Orleans Hornets.
In the end, New York Gov. Andrew Cuomo and New York Attorney General Eric Schneiderman both got involved in negotiations. In fact, they released statements announcing the deal before either company did.
MSG (MSG) shares surged 3% to close at an all-time high Friday on early reports of the deal. The company is controlled by the Dolan family, which spun it off from the Long Island, N.Y. cable operator they also control, Cablevision (CVC, Fortune 500).
Time Warner Cable (TWC, Fortune 500) shares also closed higher, despite the fact that it may have to pay more than it wanted for MSG rights. The nation's No. 2 cable operator was spun off from media conglomerate Time Warner (TWX, Fortune 500), the owner of CNNMoney, and is now a separate company. ![]()

FedEx's Fred Smith did 2 tours of duty in Vietnam as a Marine. Meet 10 Fortune 500 executives who served in the U.S. military. More
Group of farmers in southern Kansas pool their land to more than double their money from an oil company for their mineral rights. Play

Here are some hot tips if you're going out car-shopping this weekend. More

This 150-square-foot home can be shipped anywhere and then assembled like Ikea furniture. More

Many Class of 2012 grads find themselves without work. But those who landed jobs say internships are key. More