In science, priority is the credit given to the individual or group of individuals who first made the discovery or propose the theory. Fame and honours usually go to the first person or group to publish a new finding, even if several researchers arrived at the same conclusion independently and at the same time. Thus between two or more independent discoverers, the first to publish is the legitimate winner. Hence, the tradition is often referred to as the priority rule, the procedure of which is nicely summed up in a phrase "publish or perish", because there are no second prizes. In a way, the race to be first inspires risk-taking that can lead to scientific breakthroughs which is beneficial to the society (such as discovery of malaria transmission, DNA, HIV, etc.). On the other hand, it can create unhealthy competition and incentives to publish low-quality findings (e.g., quantity over quality), which can lead to an unreliable published literature and harm scientific progress.
Priority becomes a difficult issue usually in the context of priority disputes, where the priority for a given theory, understanding, or discovery comes into question. In most cases historians of science disdain retrospective priority disputes as enterprises which generally lack understanding about the nature of scientific change and usually involve gross misreadings of the past to support the idea of a long-lost priority claim. Historian and biologist Stephen Jay Gould once remarked that "debates about the priority of ideas are usually among the most misdirected in the history of science."
Richard Feynman told Freeman Dyson that he avoided priority disputes by "Always giv[ing] the bastards more credit than they deserve." Dyson remarked that he also follows this rule, and that this practice is "remarkably effective for avoiding quarrels and making friends." 
The priority rule came into existence before or as soon as modern scientific methods were established. For example, the earliest documented controversy was a bitter claim between Isaac Newton and Gottfried Wilhelm Leibniz in the 17th century about priority in the invention of calculus. This particular incidence clearly shows human biases and prejudice[according to whom?]. It has become unanimously accepted that both the mathematicians independently developed calculus. Since then priority has caused a number of historical maladies in the history of science. In the cases of scientists who have since achieved incredible levels of popularity, such as Charles Darwin and Albert Einstein, priority disputes may arise when similarities in previous research are identified. This can give rise to suspicions for plagiarism and often requires a thorough historical source analysis.