[noun] + に反して [noun] + に反した + [noun] [noun] + に反する + [noun]
に反して means "contrary to": what happened is the opposite of an expectation, a wish or a rule. It follows a noun such as よそう予想, きたい期待, きぼう希望 or きそく規則, and it sounds formal; it is at home in news and writing.
After an expectation, the second half is what actually happened, so it is not a plan or a request.
Before a noun the form is に反する or に反した. With a law or a rule, this is the usual shape, and it means "breaking".
に反して sets a result against what was expected. To contrast two people or two things, the pattern is にたいして対して or, in conversation, とちがって違って.
In conversation, おもった思ったより or いがい意外に takes the place of 予想に反して: 思ったより接戦になった.