STV will only pay ITV for programmes when it screens them and will control online access north of the Border in a deal that seeks to end a long-running dispute between the two broadcasters.

The Glasgow-based company has withdrawn from the Channel 3 Network, in which it previously had a 6% stake, and will retain only affiliate status.

The move is aimed at simplifying the previous payments system and means STV will no longer contribute to the up-front cost of ITV's programme making.

STV chief executive Rob Woodward told The Herald: "The key difference for us is that we move to a pay-as-you-go model.

"Rather than paying for our contract in advance we pay on transmission which in turn reduces the working capital requirement of our business."

It is understood there will be little change in what STV pays.

The move follows a legal battle over STV opt-outs from ITV programmes since 2009 which was settled last year when STV agreed to make £18 million of payments to ITV.

Yesterday's deal includes an arrangement for STV to pay the majority of the remaining £10.8m it is due to hand over in the next 18 months by surrendering programme rights it has already paid for rather than in cash.

The deal is still to be signed-off by industry regulator Ofcom.

Paul Richards, analyst at Numis, said: "We view it as a positive development for the group."

Investors sent STV's shares up as much as 4.1% although a late dip saw them close at 105p – a 2.13p, or 2%, fall on the day.

Mr Woodward said the new deal reflects the consolidation of the Channel 3 network which used to be made up of independent broadcasters. This left just STV and Northern Ireland's UTV independent of ITV. UTV is also moving to affiliate status.

Under the arrangement, STV will restrict to Scotland use of its online STV Player, which allows viewers to watch programmes they might have missed. The ITV Player will only be available to users south of the Border.

"The old networking agreement had grown up over 50-plus years and didn't reflect all the new ways of accessing content through platforms such as tablets and iPhones, It didn't deal with the delivery of video on demand," Mr Woodward said.

"We are able to benefit from owning our rights on video on demand and other platforms and it makes it clearer what ITV can do and what we can do. We had a long-running legal battle and some of that was about access to online rights. This new arrangement clarifies all these things."

It is understood the deal means STV will pay a fixed amount for the whole network schedule so will not benefit financially from dropping ITV programmes.

Mr Woodward insisted that programming will remain the same: "We will continue to provide the same mix of programming we have in the past."

He said STV currently takes 95% of ITV's peak-time schedule.

However, one industry source said: "If they won't save money by dropping programmes, then the likelihood is they will do it far less often. But they can still show a Scottish programme instead if they think it's the right thing to do editorially."

Adam Crozier, the Scots-born chief executive of ITV, said: "We look forward to continuing our positive relationship with STV under a new affiliate agreement.

"This agreement, which is still subject to regulatory approval, represents a major milestone for us as it consolidates and simplifies the ITV Network."