Hoima — President Museveni has said people who take him for granted make a "big mistake", citing how the ruling Uganda Peoples Congress (UPC) party treated him in 1980s.
The President cited the example while explaining his behind-the-scenes tussle with foreigners on what to do with Uganda's oil once the potential of commercial deposits became apparent.
He said shortly after capturing power in 1986, some Europeans approached him to authorise them to conduct oil exploration in Uganda.
Mr Museveni said he, however, turned down the offer and opted to send Ugandans to study oil and gas to build local capacity before exploration works could begin.
"I don't joke," the President said, "Even UPC made that mistake."
In 1980, Mr Museveni who stood for President on Uganda Patriotic Movement (UPM) ticket warned then he would go to the bush if the election was rigged.
Milton Obote won; returning to lead Uganda a second time after Idi Amin had deposed him in 1971.
Mr Museveni launched a guerilla war against the Obote government which was toppled by Tito Okello Lutwa whom Museveni overthrew in January 1986.
The President, speaking in Hoima during the launch of the East African Crude Oil Pipeline Project on Saturday, underscored the importance of wealth creation and said people who joke with him make a big mistake.
Bishop Samuel Kahuma of Bunyoro Kitara Diocese had earlier asked for people in Bunyoro region to get better benefit from the oil industry as people with the oil resources.
Speaking metaphorically, the prelate said that people living on the lakeshore shouldn't "bathe with dew".
In response, the president who said that he wanted to be a bishop but God gave him another calling, said oil proceeds will not be doled out to individuals.
He urged people to tap into oil-related nascent opportunities in the Albert Graben region.
"This project will have many workers who will need jobs, clothes, food and accommodation. Tap such opportunities," Mr Museveni told the rally attended by Omukama of Bunyoro Kitara Solomon Gafabusa Iguru.
Government officials estimate that the oil pipeline construction will create more than 10,000 new jobs while the commercial field development will add 160,000 jobs.
The 60,000 barrel-capacity oil pipeline will take oil from Hoima to Tanga Port in Tanzania.
President Museveni and the Tanzanian Foreign Affairs Minister Augustine Mahiga laid a foundation stone in Hoima on the weekend to flag the crude oil pipeline construction works.
The Tanzanian President, Mr John Magufuli, who started a three day official state visit on Thursday, skipped the Hoima function and Mr Mahiga represented him.
"We are here to recall the rich history of Bunyoro that appears in all history books of Africa. You are custodians of this oil resource. You have shown us that in the rift valley there is a hidden treasure," he said.
He said Uganda is lucky to have a leader like president Museveni whom he described as a "pan-Africanist, statesman, charismatic and confident".
"He has demonstrated that he is a liberator and a pan-Africanist. Uganda has had other leaders, but it is during his time that he discovered what others had failed," the Tanzanian minister said, likening Mr Museveni to Julius Nyerere, their former leader.
Mr Museveni, the minister said, is a president who "rewards success, love, commitment and honesty".
"Those are the values Nyerere had," Mr Mahiga added.
Uganda's Energy minister Irene Muloni said the crude oil pipeline will enhance trade and industry development between Uganda and Tanzania.
Due to Uganda getting closer to commercial oil production, Muloni said the Organisation of the Petroleum Exporting Countries (OPEC) has invited Uganda to attend its meetings in an observer status.
She said Uganda, Tanzania and their partners have agreed to fast-track oil production.
Mr Robert Kasande, the Energy ministry permanent secretary, disclosed that $900m out of $ 3.2b spent on oil exploration went to local suppliers.