Next, we're going to take a look at each one of these points in more detail. The generation of results. The first aspect to point out are the results, where the group maintained its strong capacity to generate recurring results. Pre-provision profit was EUR 6.223 billion in the quarter and $12.5 billion in the first half, 6% over the first half of 2011 and 10% above that of the second half.
In other words, we are keeping up the excellent track record of this item in which we are one of the leading banks in the world. In this slide, we can see the positive performance and we see that the performance is due to 2 drivers: First, the good dynamics of revenue, which were higher than in the first and second half of 2011; and second, cost containment. Costs are flat in the first half compared to the second half of 2011.
The second thing to point out in this first half of the year is the significant efforts made in real estate provisioning in Spain. The group decided to allocate EUR 2.78 billion gross, EUR 1.923 billion net of taxes, 1/3 of this amount came from the capital gains obtained from the sale of the subsidiary in Colombia, EUR 619 million. And 2/3, in other words, EUR 1.923 billion, came from the quarter's ordinary profit, underscoring the group's priority in strengthening the balance sheet.
In short, in the second quarter, we posted ordinary profit of EUR 1.404 billion, which, coupled with the capital gains, amounted to EUR 2.023 billion. Of this amount, EUR 1.923 billion were allocated to provisions, thus accounting attributable profit for the second quarter of 2012 was EUR 100 million. These profits do not include the capital gains generated in the recent agreement to reinsure the portfolios of insurance companies in Spain and Portugal as the operations was signed after the end of a quarter. They will be recorded in the second half of the year, and they will be assigned to real estate provisionings.