According to the deontological view on justification, being justified in believing some proposition is a matter of having done one's epistemic duty with respect to that proposition. The present paper argues that, given a proper articulation of the deontological view, it is defensible that knowledge is justified true belief, pace virtually all epistemologists since Gettier. One important claim to be argued for is that once it is appreciated that it depends on contextual factors whether a person has done her epistemic duty with respect to a given proposition, many so-called Gettier cases, which are supposed to be cases of justified true belief that are not cases of knowledge, will be seen to be not really cases of justified belief after all. A second important claim is that the remaining alleged Gettier cases can be qualified as cases of knowledge. This requires that we countenance a notion of epistemic luck, but the requisite kind of luck is of a quite benign nature.