LONDON—Prosecutors on Thursday told jurors that a multiyear affair between former News Corp editors Rebekah Brooks and Andy Coulson was an indication of their trust in each other, and that the two shared crucial information about the illegal interception of mobile-phone messages, including those of murdered teenager Milly Dowler.

In two days of opening statements at a criminal trial, prosecutors have painted a picture of an elaborate system of ordering up and paying for phone hacking at the News of the World. They allege...