The Second Anglo-Boer War had no sooner commenced with the ultimatum of the Transvaal Republic on 9 October 1899, than Mr Schreiner found himself called upon to deal with the conduct of Cape rebels. The rebels joined the invading forces of President Steyn, whose false assurances Mr Schreiner had offered to an indignant House of Assembly only a few weeks before. The war on the part of the Republics was evidently not to be merely one of self-defence. It was one of aggression and aggrandisement. Mr Schreiner ultimately addressed, as prime minister, a sharp remonstrance to President Steyn for allowing his burghers to invade the colony. He also co-operated with Sir Alfred Milner, and used his influence to restrain the Bond.
The acknowledgment of defeat by the Boers in the field, and the surrender of some 10,000 rebels, did not weaken the endeavours of the Dutch to obtain political supremacy in the colony. Moreover, in the autumn of 1902 Sir Gordon Sprigg, the prime minister, nominally the leader of the Progressives, sought to maintain his position by securing the support of the Bond party in parliament. In the early part of 1903 Mr Chamberlain included Cape Town in his visit to South Africa, and had conferences with the political leaders of all parties. Reconciliation between the Bond and British elements in the colony was, however, still impossible, and the two parties concentrated their efforts on a struggle for victory at the coming election. Mr Hofmeyr, who had chosen to spend the greater part of the war period in Europe, returned to the Cape to reorganize the Bond. On the other side Dr Jameson came forward as the leader of the Progressives. Parliament was dissolved in September 1903. It had passed, since the war, two measures of importance - one (1902) restricting alien immigration, the other (1903) ratifying the first customs convention between all the South African colonies. This convention was notable for its grant of preferential treatment (in general, a rebate of 25% on the customs already levied) to imports from the United Kingdom.
The election turned on the issue of British or Bond supremacy. It was fought on a register purged of the rebel voters, many of whom, besides being disfranchised, were in prison. The issue was doubtful, and each side sought to secure the support of the native voters, who in several constituencies held the balance of power. The Bondsmen were more lavish than their opponents in their promises to the natives and even invited an African journalist (who declined) to stand for a seat in the Assembly. In view of the agitation then proceeding for the introduction of Chinese coolies to work the mines on the Rand, the Progressives declared their intention, if returned, to exclude them from the colony, and this declaration gained them some native votes. The polling (in January and February 1904) resulted in a Progressive majority of five in a house of 95 members. The rejected candidates included prominent Bond supporters like Mr Merriman and Mr Sauer, and also Sir Gordon Sprigg and Mr A. Douglass, another member of the cabinet. Mr W. P. Schreiner, the ex-premier, who stood as an Independent, was also rejected.
On 18 February Sir Gordon Sprigg resigned and was succeeded by Dr L. S. Jameson, who formed a ministry wholly British in character. The first task of the new government was to introduce (on 4 March) an Additional Representation Bill, to rectify - in part - the disparity in electoral power of the rural and urban districts. Twelve new seats in the House of Assembly were divided among the larger towns, and three members were added to the legislative council. The town voter being mainly British, the bill met with the bitter opposition of the Bond members, who declared that its object was the extinction of their parliamentary power. In fact, the bill was called for by the glaring anomalies in the distribution of seats by which a minority of voters in the country districts returned a majority of members, and it left the towns still inadequately represented. The bill was supported by two or three Dutch members, who were the object of violent attack by the Bondsmen. It became law, and the elections for the additional seats were held in July, after the close of the session. They resulted in strengthening the Progressive majority both in the House of Assembly and in the legislative council - where the Progressives previously had a majority of one only.
At the outset of its career the Jameson ministry had to face a serious financial situation. During the war the supplying of the army in the field had caused an artificial inflation of trade, and the Sprigg ministry had pursued a policy of extravagant expenditure not warranted by the finances of the colony. The slow recovery of the gold-mining and other industries in the Transvaal after the war was reflected in a great decline in trade in Cape Colony during the latter half of 1903, the distress being aggravated by severe drought. When Dr Jameson assumed office he found an empty treasury, and considerable temporary loans had to be raised. Throughout 1904, moreover, revenue continued to shrink - compared with 1903 receipts dropped from £11,701,000 to £9,913,000. The government, besides cutting down official salaries and exercising strict economy, contracted (July 1904) a loan for £3,000,000. It also passed a bill imposing a graduated tax (6d. to 1s. in the pound) on all incomes over £1000. A substantial excise duty was placed on spirits and beer, measures of relief for the brandy-farmers being taken at the same time. The result was that while there was a deficit on the budget of 1904 - 1905 of £731,000, the budget of 1905 - 1906 showed a surplus of £5161. This small surplus was obtained notwithstanding a further shrinkage in revenue.
Dr Jameson's programme was largely one of material development. In the words of the speech opening the 1905 session of parliament, "without a considerable development of our agricultural and pastoral resources our position as a self-sustaining colony cannot be assured". This reliance on its own resources was the more necessary for the Cape because of the keen rivalry of Natal and Delagoa Bay for the carrying trade of the Transvaal. The opening up of backward districts by railways was vigorously pursued, and in other ways great efforts were made to assist agriculture. These efforts to help the country districts met with cordial recognition from the Dutch farmers, and the release, in May 1904, of all rebel prisoners was another step towards reconciliation. On the exclusion of Chinese from the colony the Bond party were also in agreement with the ministry. An education act passed in 1905 established school boards on a popular franchise and provided for the gradual introduction of compulsory education. The cultivation of friendly relations with the neighbouring colonies was also one of the leading objects of Dr Jameson's policy. The Bond, on its side, sought to draw closer to Het Volk, the Boer organization in the Transvaal, and similar bodies, and at its 1906 congress, held in March that year at Ceres, a resolution with that aim was passed, the design being to unify, in accordance with the original conception of the Bond, Dutch sentiment and action throughout South Africa.
Native affairs proved a source of considerable anxiety. In January 1905 an inter-colonial native affairs commission reported on the native question as it affected South Africa as a whole, proposals being made for an alteration of the laws in Cape Colony respecting the franchise exercised by natives. In the opinion of the commission the possession of the franchise by the Cape natives under existing conditions was sure to create in time an intolerable situation, and was an unwise and dangerous thing. (The registration of 1905 showed that there were over 23,000 "coloured" voters in the colony.) The commission proposed separate voting by natives only for a fixed number of members of the legislature - the plan adopted in New Zealand with the Māori voters. The privileged position of the Cape native was seen to be an obstacle to the federation of South Africa. The discussion which followed, based partly on the reports that the ministry contemplated disfranchising the natives, led, however, to no immediate results.
Another disturbing factor in connexion with native affairs was the revolt of the Hottentots and Hereros in German South West Africa. In 1904 and the following years large numbers of refugees, including some of the most important chiefs, fled into British territory, and charges were made in Germany that sufficient control over these refugees was not exercised by the Cape government. This trouble, however, came to an end in September 1907. In that month Jacob Morenga, a chief who bad been interned by the colonial authorities, but had escaped and recommenced hostilities against the Germans, was once more on the British side of the frontier and, refusing to surrender, was pursued by the Cape Mounted Police and killed after a smart action. The revolt in the German protectorate had been, nearly a year before the death of Morenga, the indirect occasion of a "Boer raid" into Cape Colony. In November 1906 a small party of Transvaal Boers, who had been employed by the Germans against the Hottentots, entered the colony under the leadership of a man named Ferreira, and began raiding farms and forcibly enrolling recruits. Within a week the filibusters were all captured. Ferreira and four companions were tried for murder and convicted, (February 1907), the death sentences being commuted to terms of penal servitude.
As the result of an inter-colonial conference held in Pietermaritzburg in the early months of 1906, a new customs convention of a strongly protective character came into force on 1 June 1906. At the same time the rebate on goods from Britain and reciprocating colonies was increased. The session of parliament which sanctioned this change was notable for the attention devoted to irrigation and railway schemes. But one important measure of a political character was passed in 1906, namely an amnesty act. Under its provisions over 7000 ex-rebels, who would otherwise have had no vote at the ensuing general election, were readmitted to the franchise in 1907.
While the efforts made to develop the agricultural and mineral resources of the country proved successful, the towns continued to suffer from the inflation - over-buying, over-building and over-speculation - which marked the war period. As a consequence, imports further declined during 1906 - 1907, and receipts being largely dependent on customs the result was a considerably diminished revenue. The accounts for the year ending 30 June 1907 showed a deficit of £640,455. The decline in revenue, £4,000,000 in four years, while not a true reflection of the economic condition of the country - yearly becoming more self-supporting by the increase in home produce - caused general disquiet and injuriously affected the position of the ministry. In the session of 1907 the opposition in the legislative council brought on a crisis by refusing to grant supplies voted by the lower chamber. Dr Jameson contested the constitutional right of the council so to act, and on his advice the governor dissolved parliament in September 1907. Before its dissolution parliament passed an act imposing a profit tax of 10% on diamond- and copper-mining companies earning over £50,000 per annum, and another act establishing an agricultural credit bank.
The elections for the legislative council were held in January 1908 and resulted in a Bond victory. Its supporters, who called themselves the South African party (the Progressives being renamed "Unionists"), obtained 17 seats out of a total of 26. Dr Jameson thereupon resigned (31 January 1908), and a ministry was formed with Mr John X. Merriman as premier and treasurer, and Mr J. W. Sauer as minister of public works. Neither of these politicians was a member of the Bond, and both had held office under Cecil Rhodes and W. P. Schreiner. They had, however, been the leading parliamentary exponents of Bond policy for a considerable time. The elections for the legislative assembly followed in April and, partly in consequence of the re-infranchisement of the ex-rebels, resulted in a decisive majority for the Merriman ministry. There were returned 69 members of the South African party, 33 Unionists and 5 Independents, among them the ex-premiers Sir Gordon Sprigg and Mr Schreiner. The change of ministry was not accompanied by any relief in the financial situation. While the country districts remained fairly prosperous (agricultural and pastoral products increasing), the transit trade and the urban industries continued to decline. The depression was accentuated by the financial crisis in America, which affected adversely the wool trade, and in a more marked degree the diamond trade, leading to the partial stoppage of the Kimberley mines. (The "slump" in the diamond trade is shown by a comparison of the value of diamonds exported from the Cape in the years 1907 and 1908; in 1907 they were valued at £8,973,148, in 1908 at £4,796,655.) This seriously diminished the revenue returns, and the public accounts for the year 1907 - 1908 showed a deficit of £996,000, and a prospective deficit for the ensuing year of an almost equal amount. To balance the budget, Mr Merriman proposed drastic remedies, including the suspension of the sinking fund, the reduction of salaries of all civil servants, and taxes on incomes of £50 per annum. Partly in consequence of the serious economic situation, the renewed movement for the closer union of the various South African colonies, formally initiated by Dr Jameson in 1907, received the support of the Cape parliament. During 1907 - 1908 a national convention decided upon unification, and in 1910 the Union of South Africa was established and Cape Colony became "Cape Province" therein.